diff --git a/plugins/plugin-mongodb/src/components/page/DocumentPage.tsx b/plugins/plugin-mongodb/src/components/page/DocumentPage.tsx index bc74b4663..d9736493e 100644 --- a/plugins/plugin-mongodb/src/components/page/DocumentPage.tsx +++ b/plugins/plugin-mongodb/src/components/page/DocumentPage.tsx @@ -66,8 +66,8 @@ const DocumentPage: React.FunctionComponent = ({ instance }: } diff --git a/plugins/plugin-mongodb/src/components/page/QueryPage.tsx b/plugins/plugin-mongodb/src/components/page/QueryPage.tsx index 19898b5ec..25acdaf27 100644 --- a/plugins/plugin-mongodb/src/components/page/QueryPage.tsx +++ b/plugins/plugin-mongodb/src/components/page/QueryPage.tsx @@ -46,8 +46,8 @@ const QueryPage: React.FunctionComponent = ({ instance }: IQuer } diff --git a/plugins/plugin-mongodb/src/components/panel/Collections.tsx b/plugins/plugin-mongodb/src/components/panel/Collections.tsx index 3ddf98bb3..331fe144b 100644 --- a/plugins/plugin-mongodb/src/components/panel/Collections.tsx +++ b/plugins/plugin-mongodb/src/components/panel/Collections.tsx @@ -112,7 +112,10 @@ const Collections: React.FunctionComponent = ({ placeholder="Filter" aria-label="Filter" value={filter} - onChange={(value: string): void => setFilter(value)} + onChange={(value: string): void => { + setPage({ page: 1, perPage: 20 }); + setFilter(value); + }} /> } @@ -121,7 +124,7 @@ const Collections: React.FunctionComponent = ({ name.toLowerCase().includes(filter.toLowerCase())).length} perPage={page.perPage} page={page.page} variant={PaginationVariant.bottom}