Topic: Is any way to use datatable search without define the data?

hurtsky free asked 3 years ago


Expected behavior

const searchInstance = data from table ? rather than define it at const:

document.getElementById('datatable-search-input').addEventListener('input', (e) => { searchInstance.search(e.target.value); });

Actual behavior using the data from table to do the search rather than define it at js


Grzegorz Bujański staff answered 3 years ago


You can just add table data in HTML, but it still requires some extra JS code. In this snippet you will find an example where table data is passed as HTML, not JS: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/2996228#js-tab-view


hurtsky free commented 3 years ago

thank you problem solved, i believe this example/snippet should be added to documentation.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 3.2.0
  • Device: PC
  • Browser: Chrome
  • OS: win 10
  • Provided sample code: No
  • Provided link: No