react-native-select-pro
react-native-select-pro copied to clipboard
[BUG] Unable to display Options List by default
Hi all , needed some help. I am new here so apologies for any inconvenience. I am using the React-Native-Select-Pro for my app. The default action of the module is that the optionsList is opened on clicking the drop-down icon on the Select Container. But , I want to keep the Options List open by default , without having to click on the icon to open it. Tried the 'open' prop , but it only seems to fire functions when the optionsList is opened.
Any way to keep the Options List open by default , without having to click on the icon to open it?
Much Appreciated. Thanks!
- OS: [iOS/Android]
- React Native Version - '0.72.6'
- @mobile-reality/react-native-select-pro version : '^2.2.3'
- expo version : '49.0.21'
<Select
clearable={true}
searchable={true}
options={list}
onSelect={(item) =\> setItem(item)}
placeholderText='Search Item'
styles={{
select:{
container:{
backgroundColor:”skyblue”
}
},
option:{
container:{
backgroundColor:”green”,
},
text:{
fontSize:14,
}
},
optionsList:{
Padding:10
}
}} /\>
HI @TheProgamererZ happy to help, however, we do not provide such functionality. If you want you can contribute via opening PR with this feature.
@TheProgamererZ try tp pass ref in Select
.
const selectRef = React.useRef<Select>(null)
;
useEffect(() => { ref.current = selectRef.current?.open(); }, []);
@TheProgamererZ Let us know if @danish5454 suggestion helped. Now I'm closing this ticket.