|
|
@ -28,7 +28,6 @@ |
|
|
let page = 0 |
|
|
let page = 0 |
|
|
|
|
|
|
|
|
$: fetchData(table, page) |
|
|
$: fetchData(table, page) |
|
|
$: searchable = [...(table.indexes || []), ...columns] |
|
|
|
|
|
// omit empty strings |
|
|
// omit empty strings |
|
|
$: parsedSearch = Object.keys(search).reduce( |
|
|
$: parsedSearch = Object.keys(search).reduce( |
|
|
(acc, next) => |
|
|
(acc, next) => |
|
|
@ -114,14 +113,12 @@ |
|
|
<p>{noRowsMessage}</p> |
|
|
<p>{noRowsMessage}</p> |
|
|
{/if} |
|
|
{/if} |
|
|
<div class="pagination"> |
|
|
<div class="pagination"> |
|
|
<!-- <Button primary on:click={previousPage}>First</Button> --> |
|
|
|
|
|
{#if page > 0} |
|
|
{#if page > 0} |
|
|
<Button primary on:click={previousPage}>Back</Button> |
|
|
<Button primary on:click={previousPage}>Back</Button> |
|
|
{/if} |
|
|
{/if} |
|
|
{#if rows.length === pageSize} |
|
|
{#if rows.length === pageSize} |
|
|
<Button primary on:click={nextPage}>Next</Button> |
|
|
<Button primary on:click={nextPage}>Next</Button> |
|
|
{/if} |
|
|
{/if} |
|
|
<!-- <Button primary on:click={previousPage}>Last</Button> --> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|