Topic: mdb-datatable trigger reload with JS
Loving mdbootstrap so far. I've made a lot of progress in my project with little-to-no code.
I've reviewed the your /docs/vue/tables/datatables/#external-api documentation. I'm using CDN-style Vue.js and not transpiled. I have an mdb-datatable
succesfully pulling data from a webapi returning the proper JSON-formatted data:
<mdb-datatable data="/api/v1/time/@Model.clientid" refresh striped small :pagination="false" :tfoot="false" />
This works well on initial load, and also the refresh button works as advertised. I also know there is a reactive
property to auto-reload data every few seconds.
My question: Is there is a way to manually trigger a data reload through JavaScript?
Thanks in advance.
Mikołaj Smoleński staff answered 5 years ago
Hi there,
To achieve that functionality you will have to trigger a click on the refresh button. Currently, there is no other way.
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: 6.1.0
- Device: desktop
- Browser: any
- OS: any
- Provided sample code: No
- Provided link: No