mrzachnugent / react-native-reusables

Universal shadcn/ui for React Native featuring a focused collection of components - Crafted with NativeWind v4 and accessibility in mind.
https://rnr-docs.vercel.app
MIT License
3.88k stars 157 forks source link

DropDown menu type mismatch #246

Closed ImamJanjua closed 1 month ago

ImamJanjua commented 2 months ago

I wanted to implement a dropdown menu in my app but noticed that the DropdownMenuRadioItem was not indicating which option was currently selected, even though I was passing the controlled values to it. After checking the documentation, I found that the dropdown radio-related components were supposed to accept a boolean, and the onValueChange was also expected to return a boolean. However, in my code, the value was expecting a string, and onValueChange was returning the selected radio item's value as a string. I downloaded the latest version of the dropdown menu, but it’s still receiving a string, which seems more appropriate to me than a boolean, despite what the documentation suggests.

Screenshot 2024-09-19 at 21 30 42 Screenshot 2024-09-19 at 21 31 15
mrzachnugent commented 1 month ago

@ImamJanjua Thanks for contributing! The fix can be found in the commit above this comment.