VueJs Can't fill data from store.index.json into DataTables
VueJs Can't fill data from store.index.json into DataTables
IgorB
Posts: 6Questions: 0Answers: 0
Hello,
I've a VueJs project. I try to use DataTables.net. Component Page send to DataTables-component a value and than into DataTables-component call a appropriate (with value from Page) api-request in store (index.js). Data recieved in JSON-format (in index.js). How can use JSON-data with DataTables? Pass this JSON-data into DataTables - component? Thanks
This discussion has been closed.
Replies
Assuming the JSON is just an array of data for rows you could possibly use
rows.add()
:But it will depend what your JSON structure is?
Allan
Thanks. I made it. But now i've a problem with default style.
I try to use multi-rows select. In HTML it works, but in VueJs don't.
Have you define
style: multi
? See example here,Colin
Thanks for Your answer. But can't additive correctly datatables.min.css to component DataTables into Vue-proects.
Is the DataTable being initialised while it is hidden (not in the document)? If so, you need to initialise our Select control manually with:
where
dt
is the DataTable API instance for the target table.Allan