Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: columns.slice is not a function #124

Open
cshaa opened this issue May 11, 2022 · 1 comment
Open

Uncaught TypeError: columns.slice is not a function #124

cshaa opened this issue May 11, 2022 · 1 comment

Comments

@cshaa
Copy link

cshaa commented May 11, 2022

If I try the basic example from Usage, I get a type error:

<script>
import Grid from "svelte-grid";
import gridHelp from "svelte-grid/build/helper/index.mjs";

const id = () => "_" + Math.random().toString(36).substr(2, 9);

let items = [
  gridHelp.item({ x: 0, y: 0, w: 2, h: 2, id: id() }),
  gridHelp.item({ x: 2, y: 0, w: 2, h: 2, id: id() }),
];
</script>
<Grid cols={3} bind:items={items} let:item={item}>
  <div>{item.id}</div>
</Grid>
Uncaught TypeError: columns.slice is not a function
    at getColumn (other.js:23:31)
    at index.svelte? [sm]:103:27

Link to Svelte REPL.

@cshaa
Copy link
Author

cshaa commented May 11, 2022

Uhh.... looks like the original API has changed to a much more cumbersome one and no one updated the docs... What version do I need to get the old API back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant