Closed michapixel closed 1 year ago
urghs the "if" will trigger an error, just delete it.
I would recommend creating your own paging component The handler provides all pagination features :
const pages = handler.getPages({ ellipsis: true })
console.log($pages)
result :
[ 1, 2, 3, 4, 5, null, 24 ]
Svelte template :
{#each $pages as page}
<button on:click={() => handler.setPage(page)}>
{page ?? '...'}
</button>
{/each}
Then you have complete control over styling in a minimal logic imlementation.
That being said, let me know if you still prefer that I implement a class property
Ahhh, i just recently updated to the latest version, so i wasn't aware of that approach. That's totally fine with me. <3
Great thx for your message :duck: :duck:
eg. the Pagination Component has no class whatsoever. Would be cool if Components could be written in this way too:
Inside of the Component it can be done in this way:
Don't know if this is the official way, but i found it on the webs and it was very useful for me.