Topic: 'sm' property on datatable not working
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.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- 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
Rafał Seifert commented a year 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 a year ago
Adding
datatable-sm
did work.For
.table-sm > :not(caption) > * > * { padding: 0.5rem 0.5rem; }
to work only !important is needed.