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
1k stars 297 forks source link

Allow adding a stick subheader component in MODAL list mode #730

Open lucasbasquerotto opened 1 year ago

lucasbasquerotto commented 1 year ago

Currently, I can add a subheader with:

<DropDownPicker
    listMode="MODAL"
    flatListProps={{ ListHeaderComponent: () => <MyComponent />}
    ...
/>

I want to be able to add a stick subheader. It will show any error that may happen when the user select an option in the stick header, even when the user had scrolled, otherwise (the way it is today) the user may not see the error and not understand what is happening.

The flatListProps has an option StickyHeaderComponent, but it does nothing (maybe it's overwritten by the DropDownPicker component own header; if this is the case, it could just add this property, when defined, as a child).