Trendyol / baklava

Baklava is a design system provided by Trendyol to create a consistent UI/UX for app users.
https://baklava.design/
MIT License
1.24k stars 113 forks source link

[BUG]: Disabled select option can be selected with enter #873

Closed gokcecicek closed 1 month ago

gokcecicek commented 1 month ago

Issue description

While navigating the select options with the arrow keys, a disabled option can be selected with enter. If the option is disabled, it should not be selected.

Media & Screenshots

Screenshot 2024-05-16 at 14 43 13 Screenshot 2024-05-16 at 14 43 28

Baklava Version

No response

Operating system

Priority this issue should have

Medium (should be fixed soon)

Please review the checkboxes that are applicable.

AykutSarac commented 1 month ago

Disabled option shouldn't be focused. @ahmetozantekin Would it be possible for you to updating your PR that way? fyi @Trendyol/baklava

ahmetozantekin commented 1 month ago

hi, @AykutSarac it's already like that in my MR. In L. 615 filtered the non-disabled items. ArrowDown, ArrowUp keys and focus function work with that filtered (only active) items.

here's my pull request; #874

https://github.com/Trendyol/baklava/assets/3971877/91c262b4-4f85-4cb0-b21e-16625ef479c7