'sm' property on datatable not working


Topic: 'sm' property on datatable not working

NSPA pro premium priority asked 12 months ago

Expected behavior

When using a datatable with sm="true" I expect the row/cell padding to decrease.

Actual behavior

Padding does not decrease,

.datatable table th, .datatable table td { [...], padding: var(--mdb-datatable-table-th-td-padding-y) var(--mdb-datatable-table-th-td-padding-x) }

overrides

.table-sm > :not(caption) > * > * {padding: 0.5rem 0.5rem;}

Resources (screenshots, code snippets etc.)

Basic example of https://mdbootstrap.com/docs/angular/data/datatables/#docsTabsOverview and add the sm property.


Rafał Seifert commented 12 months ago

It looks like a bug, we will take a closer look at that.

As a workaround for now, please try to add datatable-sm class to the div with datatable class.


NSPA pro premium priority commented 12 months ago

Adding datatable-sm did work.

For .table-sm > :not(caption) > * > * { padding: 0.5rem 0.5rem; } to work only !important is needed.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Open

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: Edge
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes