drop useTabIndex from TextInput

This commit is contained in:
NikolaBorislavovHristov 2019-10-15 11:09:25 +03:00
parent d7b7493a85
commit f5165f53d6

View file

@ -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}
/>
);