rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
457 stars 258 forks source link

Sorting: Null values are at top of list when in descending order #12312

Open yonasberhe23 opened 1 day ago

yonasberhe23 commented 1 day ago

Setup

Describe the bug Null values are at top of list when in descending order.

To Reproduce

  1. as Admin, go to users and auth > users
  2. create 2 users (user1 and user2)
  3. log in as user2 (last login should be populated for user2)
  4. log back in as Admin user, go to users and auth > users
  5. sort by last login in descending order
  6. notice user1 (with null value for last login), is on top of the list

Result Null values are at top of list when in descending order.

Expected Result Null values should be at the bottom when in descending order (highest to lowest). Null values should be at the top when in ascending order (lowest to highest).

Screenshots

https://github.com/user-attachments/assets/c5fe5b65-8e46-4d31-8ad3-933078cfac81

Additional context

richard-cox commented 17 hours ago

Linking https://github.com/rancher/dashboard/issues/9782, especially https://github.com/rancher/dashboard/issues/9782#issuecomment-1851856885 (any short term fixes will be undone when vai does sorting)