VirtualScroller: autoHighlight doesn't work
Describe the bug
When I use autoHighlight in AutoComplete which has virtualScrollerOptions, It doesn't work. The first item in the list is not getting highlighted. When I removed the virtualScrollerOptions property then autoHighlight was working properly.
Reproducer
https://codesandbox.io/s/primereact-demo-forked-d0w3y5?file=/src/App.js
PrimeReact version
^9.2.2
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
- Open this PrimeReact Autocomplete official basic demo code sandbox link: https://codesandbox.io/s/eyny49
- Add the below attributes to the autocomplete:
- autoHighlight={true}
- virtualScrollerOptions={{ itemSize: 38 }}
- Just save and refresh the output window
- You will be able to see the option doesn't get highlighted
Expected behavior
The first item in the dropdown list should get highlighted when we use autoHighlight with virtualScrollerOptions in Autocomplete
Hmm this was fixed previously so something has changed: https://github.com/primefaces/primereact/issues/2891
May I know when this will be fixed?
@vamsiravada unless a community member donates a PR.
Or if you have PRO support you can request this be fixed through your PRO account.
I am pretty sure #4536 fixed this by @userkks
It's still reproducing @melloware
Yes the Milestone on the right says "10.0.0" which is not released yet. So this bug is fixed but not published.
This still doesn't work in 10.0.2. See this example I forked from the Virtual Scroll example in the documentation and just added autoHighlight: https://stackblitz.com/edit/react-jqhgpu?file=src%2FApp.js
@userkks want to look at this one I thought your fix for the other fixed this but it seems broken still?
I didn't fix it but I did stop the crashing that it couldn't find element.current but the core issue still remains
@melloware checking on it
Anything new here?
@sasa0103 if you need immediate support I suggest you look into PrimeReact PRO Support: https://primereact.org/support/
I just tried it again and it's working again since at least 10.6.3.