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

OrderList: order of selection reversed when moving multiple items to top or bottom #4700

Closed
jeroenmuller opened this issue Oct 26, 2023 · 0 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2
Milestone

Comments

@jeroenmuller
Copy link

Describe the bug

There is a bug in the OrderList component on both PrimeVue 2 and 3

When selecting multiple items and moving then to the top or bottom, the order of those items is reversed.

Reproducer

https://www.primefaces.org/primevue-v2/#/orderlist

PrimeVue version

2.10.2

Vue version

2.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

This can be observed on the orderlist demo pages: https://www.primefaces.org/primevue-v2/#/orderlist by selecting multiple items (but not the top item) using control+click and clicking the "Move to Top" button

The bug only occurs if the first item is not selected when moving items to the top, and when the last item is not selected when moving items to the bottom.

When moving to top

Observe the position of Blue t-shirt item compared to the other selected items

Screencast.from.2023-10-26.19-02-59.webm

When moving to bottom

Screencast.from.2023-10-26.19-04-05.webm

Expected behavior

All selected items are moved to the top or bottom, but they do not change order with respect to each other.

So when starting with this list (indicating selection with *):

  • A
  • B *
  • C *
  • D *

After clicking move all to top, I would expect this state:

  • B *
  • C *
  • D *
  • A

The PrimeFaces orderlist has the correct behaviour: https://www.primefaces.org/primeng-v14-lts/orderlist

But the PrimeVue component reverses the order of A, B, and C

Selected items are moved to the top, but reversed

  • D *
  • C *
  • B *
  • A
@jeroenmuller jeroenmuller 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 26, 2023
@tugcekucukoglu tugcekucukoglu added this to the 2.10.3 milestone Nov 20, 2023
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2
Projects
None yet
Development

No branches or pull requests

2 participants