Semantic-Org / Semantic-UI-React

The official Semantic-UI-React integration
https://react.semantic-ui.com
MIT License
13.19k stars 4.04k forks source link

Dropdown with wrapSelection disabled and a disabled option at the start or end causes recursion error #4462

Open MitchellNeedham opened 5 months ago

MitchellNeedham commented 5 months ago

Bug Report

Steps

Create a dropdown with wrapSelection = false. Make the last option disabled.

Using arrows keys, move to the bottom of the dropdown list.

Expected Result

Selected item is the enabled option before the end.

Actual Result

Too much recursion error

Version

2.1.5

Testcase

https://codesandbox.io/p/sandbox/semantic-ui-react-forked-3tyzpv

welcome[bot] commented 5 months ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.