Skip to content

Commit

Permalink
fix db schema search pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
dechoma committed Nov 15, 2023
1 parent b081248 commit 23de25a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ export const DatabaseSchemaTable = () => {
({ currentPage, cursorType }: PagingHandlerParams) => {
if (cursorType) {
fetchDatabaseSchema({ [cursorType]: paging[cursorType] });
} else if (searchValue) {
searchSchema(searchValue, currentPage);
}
handlePageChange(currentPage);
},
[paging, fetchDatabaseSchema]
[paging, fetchDatabaseSchema, searchSchema]
);

const onSchemaSearch = (value: string) => {
Expand Down Expand Up @@ -195,6 +197,7 @@ export const DatabaseSchemaTable = () => {
{showPagination && (
<NextPrevious
currentPage={currentPage}
isNumberBased={Boolean(searchValue)}
pageSize={pageSize}
paging={paging}
pagingHandler={handleSchemaPageChange}
Expand Down

0 comments on commit 23de25a

Please sign in to comment.