Ensure that the Dashboard column sort order should be remembered when the refresh button is clicked. Fixes #7339

This commit is contained in:
Pradip Parkale
2022-04-29 10:26:24 +05:30
committed by Akshay Joshi
parent 38f642d361
commit a0c85431dc
3 changed files with 9 additions and 1 deletions

View File

@@ -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]);