Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a styling for active or selected item #608

Closed
SkMamtajuddin opened this issue Aug 12, 2024 · 0 comments · Fixed by #609 or #611
Closed

Need a styling for active or selected item #608

SkMamtajuddin opened this issue Aug 12, 2024 · 0 comments · Fixed by #609 or #611
Assignees

Comments

@SkMamtajuddin
Copy link
Contributor

Is your feature request related to a problem? Please describe.

On Android, the RNPickerSelect component does not currently support applying custom styles to the active dropdown item. This limitation makes it difficult to visually distinguish the selected item from the others, which can affect the user experience and clarity of selection.

Describe the solution you'd like

I propose adding a feature that enables custom styling for the active dropdown item specifically for the Android platform. The feature would involve:

  • Introducing a new prop, activeItemStyle, for Android only.
  • Modifying the component to apply the custom styles defined in activeItemStyle to the active item in the dropdown menu.
  • Ensuring that these styles are only applied on Android, without affecting iOS or web implementations.

Describe alternatives you've considered

One alternative could be to use the existing dropdownItemStyle prop to conditionally apply styles to the active item. However, this would complicate the logic and may not be as intuitive or efficient as having a dedicated activeItemStyle prop. The proposed solution offers a more direct and user-friendly approach to styling the active item on Android.

Additional details

  • Component Update: The RNPickerSelect component will be updated to include the activeItemStyle prop for Android and to apply these styles accordingly.
  • Testing: Unit tests will be developed to confirm that the activeItemStyle is correctly applied to the active item on Android, ensuring that the new feature works as expected.
  • Platform-Specific Implementation: This feature will be implemented specifically for Android, and will not affect iOS or web versions of the component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant