Closed panoukos41 closed 2 months ago
Hey @DavidVollmers are you working on this or could I give it a try? I implemented a search just like html select
element using the onkeydown
on a ListBox
. It scrolls the itme found in place so I would love to give it a try and then maybe try to PR my implementation for the search using keydown as a feature 😃
Hey there!
Feel free to give it a try, although the scroll implementation will be a little bit tricky here.
The keydown logic is implemented here: https://github.com/DavidVollmers/Ignis/blob/8605ab346f475708461dcf33a2c2ceb9722d3d6c/packages/Tailwind/Ignis.Components.HeadlessUI/Aria/AriaPopupExtensions.cs#L21
But I think the best way to solve this issue is to overwrite the OnAfterOpen
logic in all popups to scroll to its active descendant.
For the listbox this could happen here:
https://github.com/DavidVollmers/Ignis/blob/8605ab346f475708461dcf33a2c2ceb9722d3d6c/packages/Tailwind/Ignis.Components.HeadlessUI/Listbox.cs#L270
We should fix this for all popups though. This means we should implement it in a way we can reuse the logic for the Listbox
, Popover
and Menu
component.
I see, I will give it a try with that in mind!
This is fixed with release 1.4.0
Hey, as I was trying the ListBox with a lot of items I noticed that the keyboard doesn't scroll the list. The items get's selected etc but you can't actually see it.
Actual behavior![msedge_6](https://github.com/DavidVollmers/Ignis/assets/20771798/a6035136-f2bf-43f8-8e38-8af127645689)
Expected behavior (from official library)![msedge_4](https://github.com/DavidVollmers/Ignis/assets/20771798/3ca95751-ff0b-4861-b84a-532d230147b3)