primereact icon indicating copy to clipboard operation
primereact copied to clipboard

ListBox: metaKeySelection={true} doesn't work

Open kyybo opened this issue 11 months ago • 0 comments

Describe the bug

In the lastest version (10.5.1) the metaKeySelection default type is changed as false in some component (see https://github.com/primefaces/primereact/issues/5956). However, in the ListBox component, the attribut metaKeySelection (set as true) doesn't work anymore. We can select multiple element from the list with simple clicks, without pressing any metakeys.

Reproducer

No response

PrimeReact version

10.5.1

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

Create a standard ListBox component with the attribut "multiple" and "metaKeySelection={true}"

https://stackblitz.com/edit/nqeuji?file=src%2FApp.jsx

Expected behavior

When I set the attributs multiple and metaKeySelection={true} clicking on an element, without pressing a metakey, replace the previous selection. My chosen element is not add to the selection but become the only one element selected.

kyybo avatar Mar 04 '24 14:03 kyybo