primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.61k stars 1k forks source link

ListBox, Dropdown: style not apply for item focused, but not selected context #6846

Open vpuchkov-nr opened 2 months ago

vpuchkov-nr commented 2 months ago

Describe the bug

For ListBox and Dropdown components there seems to be an issue when custom theme styling can't be applied for focused, but not selected item. So when you move between items via keyboard up and down keys - you can't see what item is preselected and it ruins UX.

Reproducer

https://stackblitz.com/edit/bgakjh-nlrzat?file=src%2FApp.jsx

PrimeReact version

10.7.0

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 128

Steps to reproduce the behavior

  1. Go to provided link
  2. Click on any item on ListBox
  3. Move around with keyboard keys (up and down)
  4. Observe that styling for those are not applied
  5. Same for Dropdown

Expected behavior

Expected behaviour would be possibility to style focused, but not selected item (like in demo - https://stackblitz.com/run?file=src%2FApp.jsx)

badger-ua commented 1 month ago

Facing the same issue, do we know the approximate ETA for this one? thanks.