oblador / react-native-collapsible

Animated collapsible component for React Native, good for accordions, toggles etc
MIT License
2.42k stars 455 forks source link

Better options for disabling Accordion Items #296

Open iRoachie opened 4 years ago

iRoachie commented 4 years ago

Right now disabling an item in the accordion involves making use of the onChange prop to check a value that the user includes in the their sections array.

However as pointed out by @brenwall in https://github.com/oblador/react-native-collapsible/issues/148#issuecomment-499498416 feedback from touchable is still shown. We should provide a better way of disabling items.

One way off the top of my head is to allow the disabled to be boolean | number[]. That way setting it to true would disable all the items of the Accordion while passing in an array of indexes would specify which items would disabled

karthik-durai commented 4 years ago

I am interested in working on this, can you give me a head start

karthik-durai commented 4 years ago

Fix: #310