This commit is contained in:
Martin McKeaveney 2021-02-09 19:00:13 +00:00
parent 4766d21340
commit 580ae3fb4c
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>