react-native-select-pro icon indicating copy to clipboard operation
react-native-select-pro copied to clipboard

[BUG] Unable to display Options List by default

Open TheProgamererZ opened this issue 10 months ago • 1 comments

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
}
}} /\>

TheProgamererZ avatar Apr 25 '24 05:04 TheProgamererZ

HI @TheProgamererZ happy to help, however, we do not provide such functionality. If you want you can contribute via opening PR with this feature.

gitsad avatar Jun 26 '24 14:06 gitsad

@TheProgamererZ try tp pass ref in Select.

const selectRef = React.useRef<Select>(null);

useEffect(() => { ref.current = selectRef.current?.open(); }, []);

danish5454 avatar Aug 08 '24 09:08 danish5454

@TheProgamererZ Let us know if @danish5454 suggestion helped. Now I'm closing this ticket.

gitsad avatar Aug 28 '24 09:08 gitsad