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

VirtualScroller: autoHighlight doesn't work #4219

Closed
AvadhananamVamsiKrishna opened this issue Apr 4, 2023 · 13 comments · Fixed by #5050
Closed

VirtualScroller: autoHighlight doesn't work #4219

AvadhananamVamsiKrishna opened this issue Apr 4, 2023 · 13 comments · Fixed by #5050
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@AvadhananamVamsiKrishna
Copy link

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

  1. Open this PrimeReact Autocomplete official basic demo code sandbox link: https://codesandbox.io/s/eyny49
  2. Add the below attributes to the autocomplete:
  • autoHighlight={true}
  • virtualScrollerOptions={{ itemSize: 38 }}
  1. Just save and refresh the output window
  2. 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

@AvadhananamVamsiKrishna AvadhananamVamsiKrishna added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 4, 2023
@melloware
Copy link
Member

Hmm this was fixed previously so something has changed: #2891

@melloware melloware changed the title autoHighlight doesn't work with virtualScrollerOptions VirtualScroller: autoHighlight doesn't work Apr 4, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 4, 2023
@vamsiravada
Copy link

May I know when this will be fixed?

@melloware
Copy link
Member

@vamsiravada unless a community member donates a PR.

Or if you have PRO support you can request this be fixed through your PRO account.

@melloware
Copy link
Member

I am pretty sure #4536 fixed this by @userkks

@vamsiravada
Copy link

It's still reproducing @melloware

@melloware
Copy link
Member

Yes the Milestone on the right says "10.0.0" which is not released yet. So this bug is fixed but not published.

@melloware melloware modified the milestones: 10.0.0, 9.7.0 Aug 21, 2023
@melloware melloware modified the milestones: 9.7.0, 10.0.0 Sep 26, 2023
@Frdnspnzr
Copy link

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

@melloware melloware reopened this Oct 6, 2023
@melloware melloware removed this from the 10.0.0 milestone Oct 6, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 6, 2023
@melloware
Copy link
Member

@userkks want to look at this one I thought your fix for the other fixed this but it seems broken still?

@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 6, 2023
melloware added a commit to melloware/primereact that referenced this issue Oct 6, 2023
@melloware melloware reopened this Oct 6, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 6, 2023
@melloware
Copy link
Member

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 melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 6, 2023
@userkks
Copy link
Contributor

userkks commented Oct 8, 2023

@melloware checking on it

@sasa0103
Copy link

sasa0103 commented Mar 6, 2024

Anything new here?

@melloware
Copy link
Member

@sasa0103 if you need immediate support I suggest you look into PrimeReact PRO Support: https://primereact.org/support/

@Frdnspnzr
Copy link

I just tried it again and it's working again since at least 10.6.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants