How to use datatable with Svelte

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript

Research direction

Start by reading the documentation for using frappe-datatable with the NPM ecosystem and reproduce the supplied Svelte example. Determine whether the documented usage can support the reported wrapper error, then update the relevant documentation with a clear, working usage path or the required limitation; done means a newcomer can tell how to use it with Svelte.

Written by the indexing model from the issue text.

Description

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?

Dominant language
JavaScript
Stars
1.3k
Forks
223
Avg merge
23h 14m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from frappe/datatable

All issues in frappe/datatable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.