MDBDataTable search box position and sort icon problem


Topic: MDBDataTable search box position and sort icon problem

yudhapratama_11 asked 5 years ago

Expected behavior Search box is located at the right side, and showing the sort icon

Actual behavior Search box is located at middle, and the sort icon isn't showing

Resources (screenshots, code snippets etc.)


Piotr Glejzer staff answered 5 years ago

Hi,

Yes, we know about this bug. I already fixed this 2 days ago, but this an available in our gitlab repo so if you are a free user you don't have access to see it. If you would like to fix this you have to go to the folder with Datatable.js file and change line with this.handleSort(order[0], order[1]); on the componenDidMount lifecycle hooks.

This function should be replaced with if/else statement like that:

enter image description here

https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design/blob/master/src/components/DataTable/DataTable.js (line 42)

This fix will be available on the next release.

Best regards, Piotr


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.24.0
  • Device: Asus
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags