MCPcopy Index your code
hub / github.com/react-dates/react-dates / onFinalKeyDown

Method onFinalKeyDown

src/components/DateInput.jsx:142–163  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

140 }
141
142 onFinalKeyDown(e) {
143 const {
144 onKeyDownShiftTab,
145 onKeyDownTab,
146 onKeyDownArrowDown,
147 onKeyDownQuestionMark,
148 } = this.props;
149 const { key } = e;
150
151 if (key === 'Tab') {
152 if (e.shiftKey) {
153 onKeyDownShiftTab(e);
154 } else {
155 onKeyDownTab(e);
156 }
157 } else if (key === 'ArrowDown') {
158 onKeyDownArrowDown(e);
159 } else if (key === '?') {
160 e.preventDefault();
161 onKeyDownQuestionMark(e);
162 }
163 }
164
165 setInputRef(ref) {
166 this.inputRef = ref;

Callers

nothing calls this directly

Calls 4

onKeyDownShiftTabFunction · 0.70
onKeyDownTabFunction · 0.70
onKeyDownArrowDownFunction · 0.70
onKeyDownQuestionMarkFunction · 0.70

Tested by

no test coverage detected