Uncaught TypeError: columns.slice is not a function
m93a opened this issue · comments
Michal commented
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
Michal commented
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?