mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 06:32:11 +00:00
drop useTabIndex from TextInput
This commit is contained in:
parent
d7b7493a85
commit
f5165f53d6
1 changed files with 1 additions and 3 deletions
|
|
@ -1,10 +1,8 @@
|
|||
const React = require('react');
|
||||
const classnames = require('classnames');
|
||||
const useTabIndex = require('stremio/common/useTabIndex');
|
||||
const styles = require('./styles');
|
||||
|
||||
const TextInput = React.forwardRef((props, ref) => {
|
||||
const tabIndex = useTabIndex(props.tabIndex, props.disabled);
|
||||
const onKeyUp = React.useCallback((event) => {
|
||||
if (typeof props.onKeyUp === 'function') {
|
||||
props.onKeyUp(event);
|
||||
|
|
@ -21,10 +19,10 @@ const TextInput = React.forwardRef((props, ref) => {
|
|||
autoCapitalize={'off'}
|
||||
autoComplete={'off'}
|
||||
spellCheck={false}
|
||||
tabIndex={0}
|
||||
{...props}
|
||||
ref={ref}
|
||||
className={classnames(props.className, styles['text-input-container'], { 'disabled': props.disabled })}
|
||||
tabIndex={tabIndex}
|
||||
onKeyUp={onKeyUp}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue