mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-03 06:03:12 +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(
|
||||
({ currentPage, cursorType }: PagingHandlerParams) => {
|
||||
if (cursorType) {
|
||||
if (searchValue) {
|
||||
searchSchema(searchValue, currentPage);
|
||||
} else if (cursorType) {
|
||||
fetchDatabaseSchema({ [cursorType]: paging[cursorType] });
|
||||
}
|
||||
handlePageChange(currentPage);
|
||||
},
|
||||
[paging, fetchDatabaseSchema]
|
||||
[paging, fetchDatabaseSchema, searchSchema, searchValue]
|
||||
);
|
||||
|
||||
const onSchemaSearch = (value: string) => {
|
||||
@ -195,6 +197,7 @@ export const DatabaseSchemaTable = () => {
|
||||
{showPagination && (
|
||||
<NextPrevious
|
||||
currentPage={currentPage}
|
||||
isNumberBased={Boolean(searchValue)}
|
||||
pageSize={pageSize}
|
||||
paging={paging}
|
||||
pagingHandler={handleSchemaPageChange}
|
||||
|
Loading…
x
Reference in New Issue
Block a user