mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the Dashboard column sort order should be remembered when the refresh button is clicked. Fixes #7339
This commit is contained in:
committed by
Akshay Joshi
parent
38f642d361
commit
a0c85431dc
@@ -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 #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 #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 #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.
|
||||||
|
|||||||
@@ -90,6 +90,11 @@ export function CollectionNodeView({
|
|||||||
const [reload, setReload] = React.useState(false);
|
const [reload, setReload] = React.useState(false);
|
||||||
const [loaderText, setLoaderText] = React.useState('');
|
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([
|
const [pgTableColumns, setPgTableColumns] = React.useState([
|
||||||
{
|
{
|
||||||
Header: 'properties',
|
Header: 'properties',
|
||||||
|
|||||||
@@ -229,8 +229,10 @@ export default function PgTable({ columns, data, isSelectRow, caveTable=true, ..
|
|||||||
const rowHeights = React.useRef({});
|
const rowHeights = React.useRef({});
|
||||||
|
|
||||||
// Reset Search value on tab changes.
|
// Reset Search value on tab changes.
|
||||||
|
|
||||||
React.useEffect(()=>{
|
React.useEffect(()=>{
|
||||||
setSearchVal('');
|
setSearchVal(prevState => (prevState));
|
||||||
|
setGlobalFilter(searchVal || undefined);
|
||||||
rowHeights.current = {};
|
rowHeights.current = {};
|
||||||
tableRef.current?.resetAfterIndex(0);
|
tableRef.current?.resetAfterIndex(0);
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|||||||
Reference in New Issue
Block a user