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

@ -45,3 +45,4 @@ Bug fixes
| `Issue #7308 <https://redmine.postgresql.org/issues/7308>`_ - Ensure that sorting should be preserved on refresh for Server Activity.
| `Issue #7322 <https://redmine.postgresql.org/issues/7322>`_ - Fixed an issue while creating a new database throwing an error that failed to retrieve data.
| `Issue #7333 <https://redmine.postgresql.org/issues/7333>`_ - Fixed an issue where the drag and drop table in ERD throws an error.
| `Issue #7339 <https://redmine.postgresql.org/issues/7339>`_ - Ensure that the Dashboard column sort order should be remembered when the refresh button is clicked.

View File

@ -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',

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