Topic: Small bug / feedback on max-height property of MDBDatatable

Bridget Melvin premium asked 1 year ago

Expected behavior when applying the maxHeight='460px' to MDBDatatable (styled with styled-components if it matters), if I change the entries pagination to 5 from default of 10 the height should shrink to fit content.

Actual behavior Instead, the height remains the same at 460px and there is weird space between the datatable and pagination footer. In dev tools, 460px is being applied to the height property not max-height.

Resources (screenshots, code snippets etc.) I fixed it with styled components and removing the maxHeight property from StyledTable....

const StyledTable = styled(MDBDatatable)`
  align: center;
  width: fit-content;

  min-width: 800px;
  max-width: 1200px;

  & .datatable-inner {
    max-height: 460px;

  & td {
    margin-bottom: 0!important;
    padding-bottom: 6px! important;

Yes, it has already been fixed and will be available in the next release. Thank you for reporting.

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 4.1.0
  • Device: Surface Laptop Studio
  • Browser: Chrome
  • OS: Windows 11
  • Provided sample code: Yes
  • Provided link: No