Setting Data to Angular material data table from Node API and its sorting case sensitive order...

Discussão em 'Angular' iniciado por Mohammad Malek, Março 17, 2025.

  1. I am setting data from node API to angular material datable and added a sort header to a specific column but the problem is sorting I mean when I perform a sort on a specific column it does not give the perfect result

    e.g my data is as follows

    No. column-1 column-2

    1. abcd ff sfsfk
    2. Adcd sd gfdfd
    3. Asdjf sdffg
    4. Bddf sdfsf
    5. bssfsd sfere
    6. amdfd sdfsf
    7. Bsdf sdfs

    When I am performing a sort operation on column 1 then the result i am getting is as follows

    No. column-1 column-2

    1. Adcd sd gfdfd
    2. Asdjf sdffg
    3. Bddf sdfsf
    4. Bsdf sdfs
    5. amdfd sdfsf
    6. abcd ff sfsfk
    7. bssfsd sfere

    But I want exactly as follow (Case insensitive)

    No. column-1 column-2

    1. abcd ff sfsfk
    2. Adcd sd gfdfd
    3. amdfd sdfsf
    4. Asdjf sdffg
    5. Bddf sdfsf
    6. Bsdf sdfs
    7. bssfsd sfere

    Please let me know how to archive this result. Note: From API I am getting perfact result as I want but when I set that API data in an angular MUI table and when I sort it performs case-sensitive sorting so I want to perform case-insensitive sorting when the user performs sorting operation on a particular column

    Continue reading...

Compartilhe esta Página