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.
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
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 beboolean | number[]
. That way setting it totrue
would disable all the items of the Accordion while passing in an array of indexes would specify which items would disabled