danish1658 / react-native-dropdown-select-list

☝️ React Native Select List Equivalent to Html's Select with options"
https://www.npmjs.com/package/react-native-dropdown-select-list
MIT License
193 stars 90 forks source link

How to disable the SelectList #91

Closed yannou97430 closed 9 months ago

yannou97430 commented 10 months ago

As we can for ie do with an input: editable={false}

So nothing happens when it's clicked

gowravl commented 9 months ago

I have wrapped the SelectList inside a View with pointerEvents="none" to disable the view and "auto" to enable it

yannou97430 commented 9 months ago

So you're saying that the following should do the trick ?

<SelectList ... pointerEvents="none" ... />

It doesn't on my side. Or maybe I'm not using the right way ?

gowravl commented 9 months ago

You cannot sent pointerEvents directly to SelectList as it's not expecting it. You can do it like this `<View pointerEvents={editable ? 'auto' : 'none'}>

`

yannou97430 commented 9 months ago

You rock, thanks !