svelte-ux
svelte-ux copied to clipboard
[paginationStore] Add `onChange` callback
While you can use a changeStore to accomplish the task of calling a function when you change page/etc, being able to provide a paginationStore({ onChange: () => ... })
would simplify this case.
Adding something like...
if (props?.onChange) {
state.subscribe(props.onChange)
}
...to paginationStore should work.
See discussion