Topic: Custom datatable search

Christian Cazzaro pro asked 1 year ago


Hi

I need to create a custom datatable with search method. I noticed that datatable search can be built only with javascript and not with HTML table attributes.

When I build a table in HTML I can custom text in the for example by providing a class such as "badge". How can I achieve that when building the table in JS? Also, how can I add action buttons as last column?

Thanks


Mateusz Lazaru staff answered 1 year ago


Hi,

You want to customize text inside search-input or inside the table? Currently there is no way to automatically pass classes from 'original' HTML table to newly created mdb.Table.

It only can be done after initialization, via CSS or JS.

I've creatted snipped with some styling examples and with action buttons in last column:

https://mdbootstrap.com/snippets/standard/mlazaru/4255395#html-tab-view



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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 4.4.0
  • Device: MacBook Pro
  • Browser: Chrome
  • OS: iOS
  • Provided sample code: No
  • Provided link: No