Topic: way to indicate "search in progress..." in datatable search

bpeterson priority asked 1 week ago


When trying to filter a very large amount of data in a datatable on the client side. [20k records with 8 items each are 160k records to filter] I realize data will be processed on the computer/browser and may take a while to run. Is there a recommended way to indicate "search in progress..." or "searching..." while this is happening? Or maybe float a spinner above the table ?

Unfortunately, server-side filtering is not a practical option at the moment.


Grzegorz Bujański staff answered 1 week ago


We don't have a recommended way. But check out this snippet: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/5290220#js-tab-view

This is just a general idea of ​​how you can use our built-in loader. But this solution forces you to create an asynchronous filter function yourself, which after returning the result (promise) will add the filtered data again


bpeterson priority commented 6 days ago

@Grzegorz, thanks. I was able to achieve this already, and was hoping more for guidance on how to incorporate an asynchronous filter function; are there any examples or snippets doing that?


kpienkowska staff commented 5 days ago

There are no snippets available. To accomplish the task, you simply need to incorporate a filtering function into the existing snippet mentioned above. This function will be responsible for filtering the rows based on the desired criteria. Once the filtering is applied, the resulting rows can then be passed to the update method..



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

  • User: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: Chrome
  • OS: Win10
  • Provided sample code: No
  • Provided link: No