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

PickList: Double-Click - With Item A selected, Double-Click Item B moves A #6315

Open
MichaelChambers opened this issue Aug 30, 2024 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@MichaelChambers
Copy link

MichaelChambers commented Aug 30, 2024

Describe the bug

Relates to primefaces/primeng#14622

For PrimeVue, the double click issue starts with 3.45.0, and is likely related to that also being the first release where the user can click to select more than one node (without using Ctrl). I can click a row which selects it. Then if I double click a different row, the first one I selected is the one that gets moved, not the row I double-clicked.

Further, it is now in an inconsistent state. Double-clicking any other item in the same list no longer does anything, so it APPEARS that double-clicks don't work at all. But upon single-clicking any item, the state is restored and double-clicks will again work in that list.

I am staying on 3.44.0 to avoid the issue.
A workaround might be to let us have a property to prevent users from selecting more than one row at a time. If it knows it can force single-selection, then in theory any click could deselect a previously clicked row like it seems to do in 3.44.0 and then the double-click could work on the correct row. I'd be happy to use such a single-selection-only property when instantiating my component.

Reproducer

https://v3.primevue.org/picklist/
or
https://stackblitz.com/edit/primevue-3-vite-ts-issue-template-wmkgsj?file=src%2FApp.vue

PrimeVue version

3.45.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

  1. Open the PrimeVue 3 PickList Demo at https://v3.primevue.org/picklist/
  2. In the Basic, Single-Click any available item to select it - e.g. select Blue Band
  3. Double-Click a different item - e.g. double-click Black Watch
  4. Error - the item previously selected (Blue Band) is moved to the selected list, not the doubleclicked item (Black Watch)
  5. Error - double-click any other item in the same source list and nothing happens
  6. Single-click any item in the source list, and double-clicks will again work in that list.

Expected behavior

When Item A is selected, and then Item B is double-clicked, Item B should be the one that moves.
I don't really care what happens to Item A. Any of these are reasonable as long as double-clicked Item B moves.

  1. Item A could also move with Item B
  2. Item A could remain and remain selected (this is similar to a selected item on the other side staying selected after the move)
  3. Item A could remain and get unselected (this is what happens in 3.44.0)
@MichaelChambers MichaelChambers added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 30, 2024
@MichaelChambers MichaelChambers changed the title PickLIst: DoubleClick - With Item A selected, Doubleclick Item B moves A PickList: Double-Click - With Item A selected, Double-Click Item B moves A Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant