Open jobberma opened 3 months ago
I also needed this, seems like the library has some default behavior for the dropdown items and there is no way to overwrite it. Yet I was able to achieve something in a counterintuitive way, by wrapping the items in a Pressable
, like so:
renderItem={(item) => (<Pressable
disabled={item.isEnabled}
style={[
styles.dropdownItemStyle,
!item.isEnabled && styles.dropdownItemDisabled,
]}
>
<Text>{item.text}</Text>
</Pressable>)
Not sure I fully understand why it works, as you can notice, the disable/enable logic is reversed, my theory is that the Pressable captures all the press events, this way preventing the default behavior of the item press.
Hello,
The plugin is great. I need to make a parent category menu item disabled.
Is there a way to do that ?
Thanks