mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-23 07:34:35 -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:
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 #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.
|
||||
|
@ -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',
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user