DataTable altered sorting behavior

UI Components for Vue
Post Reply
Searerva
Posts: 2
Joined: 15 Sep 2022, 11:55

16 Sep 2022, 09:44

Is it possible to change how DataTable sorts the data? I would like populated fields to be prioritized, so that in the list below, any date field is populated first, then blanks. Right now, blanks are treated as a higher order in the sorting. I think this might be locale-related, but can that be set per-table, or is there any way to implement custom sorting on DataTable?

Data Set

Code: Select all

Case Number    Followup Date
     123123       
     111111       2022-10-29
     222222    
     333333       2023-01-02
     444444       2023-01-03
     555555    
     666666       2022-09-25
Current behavior when sorting on Followup Date

Code: Select all

Case Number    Followup Date
     123123       
     222222    
     555555    
     666666       2022-09-25
     111111       2022-10-29
     333333       2023-01-02
     444444       2023-01-03
Wanted behavior when sorting on Followup Date

Code: Select all

Case Number    Followup Date
     666666       2022-09-25
     111111       2022-10-29
     333333       2023-01-02
     444444       2023-01-03
     123123       
     222222    
     555555    

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests