public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM7339]: Dashboard column sort order not remembered when refresh button pressed (same for filter)
Date: Fri, 29 Apr 2022 09:56:26 +0530
Message-ID: <CAJ9T6Ssi5DmEuuFmScrHpDa-FDidnzX7R372Nc63XzUDN-ywGA@mail.gmail.com> (raw)
Hi Hackers,
Please find the attached for # 7339.
I have fixed the below issue in this patch
1. Filter text is disappearing after refresh.
2. Collection node properties are not refreshing after collection node
refresh.
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM7339.patch (1.3K, 3-RM7339.patch)
download | inline diff:
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]);
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin][RM7339]: Dashboard column sort order not remembered when refresh button pressed (same for filter)
In-Reply-To: <CAJ9T6Ssi5DmEuuFmScrHpDa-FDidnzX7R372Nc63XzUDN-ywGA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox