Topic: 'sm' property on datatable not working

NSPA priority asked 1 year 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 free commented 1 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 priority commented 1 year 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

Opened

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: Edge
  • OS: Windows
  • Provided sample code: Yes
  • Provided link: Yes