hossein-zare / react-native-dropdown-picker

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
https://hossein-zare.github.io/react-native-dropdown-picker-website/
MIT License
969 stars 294 forks source link

modalTitleStyle being overwritten #741

Open AounNaqvi173 opened 4 months ago

AounNaqvi173 commented 4 months ago

modalTitleStyle props are not working as the textStyle is overwriting it

const _modalTitleStyle = useMemo( () => [ THEME.modalTitle, ...[modalTitleStyle].flat(), ...[textStyle].flat(), ], [textStyle, modalTitleStyle, THEME], );

this is not good for styling the modal header if we move ...[textStyle].flat() above ...[modalTitleStyle].flat(), it will work fine and will not overwrite the modalTitleStyle and if the user does not pass modalTitleStyke it will still work as expected

here is the problem : https://github.com/hossein-zare/react-native-dropdown-picker/blob/09c636436833d64a43ce0a77044774969afe7b9b/src/components/Picker.js#L1741