This small demo shows the DataTables jQuery library working in SolidJS.
This may not be the best solution! But it's the only way I've been able to get it to work.
Note also! I haven't confirmed that reactivity works with this yet...
There are four steps:
- Include the datatables css file in
index.html
. - In App.tsx,
import jQuery from 'jquery'
and thenimport 'datatables.net'
. - Create an hmtl table and make note of its id.
- Make the table a datatable with
jQuery(function() {jQuery('#table_id').dataTable();});
.