diff --git a/web/pgadmin/misc/properties/CollectionNodeProperties.jsx b/web/pgadmin/misc/properties/CollectionNodeProperties.jsx index 25703eb6d..9ac2a5b5f 100644 --- a/web/pgadmin/misc/properties/CollectionNodeProperties.jsx +++ b/web/pgadmin/misc/properties/CollectionNodeProperties.jsx @@ -90,6 +90,11 @@ export function CollectionNodeView({ const [reload, setReload] = React.useState(false); const [loaderText, setLoaderText] = React.useState(''); + //Reload the collection node on refresh or change in children count + React.useEffect(() => { + setReload(!reload); + }, [item?._children]); + const [pgTableColumns, setPgTableColumns] = React.useState([ { Header: 'properties', diff --git a/web/pgadmin/static/js/components/PgTable.jsx b/web/pgadmin/static/js/components/PgTable.jsx index c2d23e0df..78e8590b1 100644 --- a/web/pgadmin/static/js/components/PgTable.jsx +++ b/web/pgadmin/static/js/components/PgTable.jsx @@ -229,8 +229,10 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, .. const rowHeights = React.useRef({}); // Reset Search value on tab changes. + React.useEffect(()=>{ - setSearchVal(''); + setSearchVal(prevState => (prevState)); + setGlobalFilter(searchVal || undefined); rowHeights.current = {}; tableRef.current?.resetAfterIndex(0); }, [data]);