Topic: MDBDataTableV5 sort not working after chaging it one time

MaximeGheraille free asked 4 years ago


Expected behavior

It should be able to sort asc when selecting the 'name' and the reselecting it should resort it by 'des'

Actual behavior

When selecting the 'Name' it gets sorted from a to z. If i try to sort again (so it should go from 'z to a') but it does not work.

for some reason on your website it does work

Resources (screenshots, code snippets etc.)

  <MDBRow className="mt-5">
    <MDBCol md="8" className="offset-2">
      <MDBDataTableV5 hover data={datatable} filter='office' proSelect searchTop searchBottom={false} />
    </MDBCol>
  </MDBRow>

and using the data from the https://mdbootstrap.com/docs/react/tables/datatables/ at the 'With filter' part


Piotr Glejzer staff commented 4 years ago

try to remove ` from index.js


MaximeGheraille free commented 4 years ago

@Piotr Glejzer What do you mean with remove ` from index.js ?


Piotr Glejzer staff commented 4 years ago

uh sorry, I don't why this wasn't shown in the example. I mean, you can try to remove React.StrictMode from index.js and try to sort again.


MaximeGheraille free commented 4 years ago

@Piotr Glejzer It does work when removing it but is there not an options where i can let it because I prefere having the strict mode enabled


Piotr Glejzer staff commented 4 years ago

Yes, I know that but there is no possibility of working with this at the moment.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: PC
  • Browser: Chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: Yes