default props added to text input

This commit is contained in:
NikolaBorislavovHristov 2019-09-19 11:12:12 +03:00
parent 278b58a041
commit 31fec02da9
2 changed files with 7 additions and 6 deletions

View file

@ -44,14 +44,10 @@ const SearchBar = ({ className }) => {
key={query} key={query}
ref={searchInputRef} ref={searchInputRef}
className={styles['search-input']} className={styles['search-input']}
defaultValue={query}
tabIndex={-1}
size={1}
type={'text'} type={'text'}
placeholder={'Search'} placeholder={'Search'}
autoCorrect={'off'} defaultValue={query}
autoCapitalize={'off'} tabIndex={-1}
spellCheck={false}
onSubmit={queryInputOnSubmit} onSubmit={queryInputOnSubmit}
/> />
: :

View file

@ -16,6 +16,11 @@ const TextInput = React.forwardRef((props, ref) => {
}, [props.onKeyUp, props.onSubmit]); }, [props.onKeyUp, props.onSubmit]);
return ( return (
<input <input
size={1}
autoCorrect={'off'}
autoCapitalize={'off'}
autoComplete={'off'}
spellCheck={false}
tabIndex={focusable && !props.disabled ? 0 : -1} tabIndex={focusable && !props.disabled ? 0 : -1}
{...props} {...props}
ref={ref} ref={ref}