{ offset = num * limit - limit; scrollTo({ top: 0, behavior: 'smooth' }); onsubmit?.(offset); }} > {#snippet children({ pages, currentPage })} {#each pages as page (page.key)} {#if page.type === 'ellipsis'} {:else} {/if} {/each} {/snippet}