Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shared/common-adapters/plain-input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export type Props = {
onKeyDown?: (event: React.KeyboardEvent) => void
onKeyUp?: (event: React.KeyboardEvent) => void
spellCheck?: boolean
tabIndex?: number // desktop only
// Mobile only
children?: React.ReactNode
allowFontScaling?: boolean
Expand Down
3 changes: 2 additions & 1 deletion shared/common-adapters/plain-input.desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PlainInput = React.memo(
const {growAndScroll, multiline, onFocus: _onFocus, selectTextOnFocus, onChangeText} = p
const {maxBytes, globalCaptureKeypress, onBlur, onClick, style, resize, maxLength} = p
const {rowsMin, rowsMax, textType, padding, flexable = true, type} = p
const {autoFocus, allowKeyboardEvents, placeholder, spellCheck, disabled, value, className} = p
const {autoFocus, allowKeyboardEvents, placeholder, spellCheck, disabled, value, className, tabIndex} = p
const inputRef = React.useRef<NativeTextRef>(null)
const isComposingIMERef = React.useRef(false)
const mountedRef = React.useRef(true)
Expand Down Expand Up @@ -216,6 +216,7 @@ const PlainInput = React.memo(
placeholder,
ref: inputRef,
spellCheck,
tabIndex,
value,
...(maxLength ? {maxLength} : {}),
...(disabled ? {readOnly: true} : {}),
Expand Down
2 changes: 2 additions & 0 deletions shared/common-adapters/search-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type Props = {
onKeyDown?: (event: React.KeyboardEvent) => void
onKeyUp?: (event: React.KeyboardEvent) => void
onKeyPress?: (event: NativeSyntheticEvent<{key: string}>) => void
tabIndex?: number // desktop only
measureRef?: React.RefObject<MeasureRef | null>
}

Expand Down Expand Up @@ -201,6 +202,7 @@ const SearchFilter = React.forwardRef<SearchFilterRef, Props>(function SearchFil
onKeyUp={props.onKeyUp}
onKeyPress={props.onKeyPress}
onEnterKeyDown={props.onEnterKeyDown}
tabIndex={props.tabIndex}
ref={inputRef}
hideBorder={true}
containerStyle={styles.inputContainer}
Expand Down