You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this package in a project which has InertiaJS+Laravel and Svelte setup. The InertiaJS+Laravel is not much of a concern, atleast not for now. How to use this with svelte? Any help is much appreciated.
For now, after installing the package using npm,
This is the svelte page I am trying to open,
<script>
import Layout from '../Layout/Layout.svelte'
import {DataTable} from 'simple-datatables'
export let banks;
console.log(banks);
let myData = {"headings": ["Name","Company","Ext.","Start Date","Email","Phone No."],"data": [["Hedwig F. Nguyen","Arcu Vel Foundation","9875","03/27/2017","[email protected]","070 8206 9605"],["Genevieve U. Watts","Eget Incorporated","9557","07/18/2017","[email protected]","0800 106980"],]};
let dataTable = new DataTable('#myTable', {data: myData});
</script><Layout><sectionslot="main-content"><divclass="container"><tableid="myTable"class="table table-sm table-nowrap"></table></div></section></Layout>
and I am getting this error.
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'appendChild')
at new it (datatable.ts:110:17)
which point to here in datatables.ts file,
I am an experienced Laravel developer, trying my hands on svelte and the JS world.
Kindly help.
Thanks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to use this package in a project which has InertiaJS+Laravel and Svelte setup. The InertiaJS+Laravel is not much of a concern, atleast not for now. How to use this with svelte? Any help is much appreciated.
For now, after installing the package using npm,
This is the svelte page I am trying to open,
and I am getting this error.
which point to here in datatables.ts file,
I am an experienced Laravel developer, trying my hands on svelte and the JS world.
Kindly help.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions