1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00
This commit is contained in:
Martin McKeaveney 2021-02-09 19:00:13 +00:00
parent fb4b371d27
commit c132b7b584
2 changed files with 1 additions and 7 deletions

View file

@ -7,10 +7,7 @@ import { enrichRows } from "./rows"
export const searchTable = async ({ tableId, search, pagination }) => {
const rows = await searchTableData({ tableId, search, pagination })
return rows
// TODO
// Enrich rows so they can displayed properly
// return await enrichRows(rows, tableId)
return await enrichRows(rows, tableId)
}
/**

View file

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