AdelRedaa97 / react-native-select-dropdown

react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
MIT License
314 stars 134 forks source link

Update types to allow customized RowChild and ButtonChild #109

Closed pjadavies closed 1 year ago

pjadavies commented 1 year ago

Fixes https://github.com/AdelRedaa97/react-native-select-dropdown/issues/75

When using renderCustomizedRowChild or renderCustomizedButtonChild, the default props rowTextForSelection or buttonTextAfterSelection (respectively) aren't needed but cause Typescript errors if they're omitted (see #75).

This PR requires (renderCustomizedRowChild OR rowTextForSelection) AND (renderCustomizedButtonChild OR buttonTextAfterSelection) to fix the error, while ensuring required props are included.