MDBDatatable extra whitespace below last row


Topic: MDBDatatable extra whitespace below last row

mac.wierda@dataworld.ai pro premium priority asked 2 years ago

Expected behavior

When using the MDBDatatable component, there is no extra whitespace between the bottom of the last row and the pagination bar at the bottom. Or, that there is no extra space between the final row and a border at the bottom.

Actual behavior

There is extra whitespace between the bottom of the last row and either the pagination bar or a bottom border

Resources (screenshots, code snippets etc.)

MDBDatatable extra whitespace below last row, before pagination [MDBDatatable extra whitespace below last row, before bottom border


Wojciech Staniszewski staff commented 2 years ago

Could you show me your datatable code? I tested it and I don't see any problems with extra so


mac.wierda@dataworld.ai pro premium priority answered 2 years ago

Solution: As long as it's not directly beneath an MDBRow then it displays correctly, such as below:

<MDBRow className="mt-4">
    <MDBCol>
      <MDBRow>
        <h4>Applications</h4>
      </MDBRow>
      <MDBDatatable data={applicationsTableData} />
    </MDBCol>
  </MDBRow>

But if you move the datatable outside of the MDBCol and right below the MDBRow (so on line 2) then the whitespace appears.

Screenshot:

MDBDatatable no whitespace


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: Pro
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 4.2.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No