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

Datatable: Sort mode multiple - undefined breaks order #4555

Closed
MalikBen opened this issue Oct 5, 2023 · 1 comment · Fixed by #4570
Closed

Datatable: Sort mode multiple - undefined breaks order #4555

MalikBen opened this issue Oct 5, 2023 · 1 comment · Fixed by #4570
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@MalikBen
Copy link
Contributor

MalikBen commented Oct 5, 2023

Describe the bug

Hi, I think I've found a bug using the multiple sort-mode.
When a value is undefined into the list, the sorting is broken.

You can see the reproduction here where the third row has an undefined quantity. If you sort by quantity, the order is not good, the row with the undefined value should be at the top or a the bottom of the list.

Reproducer

https://codesandbox.io/s/primevue-demo-forked-lv8klr?file=/src/App.vue

PrimeVue version

3.35.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

  1. Sort by quantity, ASC or DESC

Expected behavior

The row with the undefined value should be at the top or a the bottom of the list.

@MalikBen MalikBen 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 5, 2023
@MalikBen
Copy link
Contributor Author

MalikBen commented Oct 5, 2023

Note that null values don't brake the order, only undefined values

tugcekucukoglu added a commit that referenced this issue Oct 10, 2023
Fix #4555 - DataTable: Add nullSortOrder prop
@tugcekucukoglu tugcekucukoglu added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 10, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.35.1 milestone Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
2 participants