frappe / datatable

The Missing Javascript Datatable for the Web
https://frappe.io/datatable
MIT License
1.02k stars 163 forks source link

How to use datatable with Svelte #119

Open mcmxcdev opened 3 years ago

mcmxcdev commented 3 years ago

The documentation about using it with the NPM ecosystem is unfortunately not very informative, I want to use frappe-datatable like this:

<script>
  import DataTable from 'frappe-datatable';

  const columns = ['Name', 'Position', 'Salary'];
  const data = [
    ['Faris', 'Software Developer', '$1200'],
    ['Manas', 'Software Engineer', '$1400'],
  ];
</script>

<DataTable id="datatable" columns="{columns}" data="{data}" />

but I receive: frappe-datatable.cjs.js:5552 Uncaught (in promise) Error: Invalid argument given for wrapper

How can I get it to work?