Closed evapastors closed 1 month ago
I'm using the runes version and whenever I call table.clearSearch() I get the error "RangeError: Maximum call stack size exceeded".
I created this minimal example of a table with a searchbar:
<script lang="ts"> import { TableHandler } from "@vincjo/datatables"; const test: { name: string; address: string }[] = [ { name: "Max Mustermann", address: "Example Street 1" }, { name: "Test Person", address: "Street 2" }, ]; const handler = new TableHandler(test); const search = handler.createSearch(["name"]); const onReset = () => { handler.clearSearch(); }; </script> <input type="text" bind:value={search.value} oninput={() => search.set()} /> <div> {#each handler.rows as row} <div> <div>{row.name}</div> </div> {/each} </div> <button type="button" onclick={onReset}>Clear</button>
Thx for the repro. I wouldn't have noticed this one. The internal event dispatcher caused the error. Fix published in 2.0.0-runes.45
2.0.0-runes.45
I'm using the runes version and whenever I call table.clearSearch() I get the error "RangeError: Maximum call stack size exceeded".
I created this minimal example of a table with a searchbar: