You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
No compile errors in code like this:
constFoo=()=>(<Selectmultipleoptions={[{label: 'One',value: '1'},{label: 'two',value: '2'},{label: 'Three',value: '3'},]}onSelect={({value},optionIndex)=>{console.log(`Selected ${value} which is the ${optionIndex}th item`)}}onRemove={({value},optionIndex)=>{console.log(`Removed ${value} which is the ${optionIndex}th item`)}}/>);
Screenshots
Environment (please complete the following information):
OS: any
OS Version: any
The text was updated successfully, but these errors were encountered:
Describe the bug
As far as I can tell,
onRemove
is always called with a single item, yet it's declared to accept multiple items:react-native-select-pro/packages/react-native-select-pro/src/types/types.ts
Lines 207 to 214 in 6bc7677
Because of this, I get TypeScript errors in my code unless I convince the compiler that I know what I'm doing:
Notice that the example in the repo has to actively suppress this error with
as OptionType
:react-native-select-pro/apps/expo/src/examples/real-example.tsx
Lines 51 to 57 in 6bc7677
To Reproduce
Steps to reproduce the behavior:
onRemove
handlerExpected behavior
No compile errors in code like this:
Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: