Open Vovan-VE opened 3 years ago
There are more mistakes:
type DomProps
has tabIndex: string
which is incompatible with React declaration tabIndex?: number
: string
cannot be assigned to number | undefined
;renderOption
is declared as SelectedOption
, but SelectSearchOption
(options[i]
) actually is passing to it.The library is quite small. Perhaps it should be rewritten in typescript? It would be easier to avoid such mistakes then and it shouldn't be that hard.
Hello.
Version 2.2.4. From TypeScript declaration:
However
onChange
actually receives(string, SelectedOption)
and not(SelectedOptionValue, SelectedOption)
(multiple=false
).Either
SelectedOptionValue
declared wrong oronChange
1st argument must bestring|string[]
(same as type ofvalue
).