mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-05 07:03:07 +00:00
* fix db schema search pagination * reorder conditions * added searchValue Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> --------- Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
This commit is contained in:
parent
64b00a2dca
commit
d55100592d
@ -128,12 +128,14 @@ export const DatabaseSchemaTable = () => {
|
|||||||
|
|
||||||
const handleSchemaPageChange = useCallback(
|
const handleSchemaPageChange = useCallback(
|
||||||
({ currentPage, cursorType }: PagingHandlerParams) => {
|
({ currentPage, cursorType }: PagingHandlerParams) => {
|
||||||
if (cursorType) {
|
if (searchValue) {
|
||||||
|
searchSchema(searchValue, currentPage);
|
||||||
|
} else if (cursorType) {
|
||||||
fetchDatabaseSchema({ [cursorType]: paging[cursorType] });
|
fetchDatabaseSchema({ [cursorType]: paging[cursorType] });
|
||||||
}
|
}
|
||||||
handlePageChange(currentPage);
|
handlePageChange(currentPage);
|
||||||
},
|
},
|
||||||
[paging, fetchDatabaseSchema]
|
[paging, fetchDatabaseSchema, searchSchema, searchValue]
|
||||||
);
|
);
|
||||||
|
|
||||||
const onSchemaSearch = (value: string) => {
|
const onSchemaSearch = (value: string) => {
|
||||||
@ -195,6 +197,7 @@ export const DatabaseSchemaTable = () => {
|
|||||||
{showPagination && (
|
{showPagination && (
|
||||||
<NextPrevious
|
<NextPrevious
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
|
isNumberBased={Boolean(searchValue)}
|
||||||
pageSize={pageSize}
|
pageSize={pageSize}
|
||||||
paging={paging}
|
paging={paging}
|
||||||
pagingHandler={handleSchemaPageChange}
|
pagingHandler={handleSchemaPageChange}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user