diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js
index 416814830..ef5a9c632 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js
@@ -279,7 +279,7 @@ define('pgadmin.node.table', [
type:'GET',
})
.done(function(res) {
- Notify.success(res.info);
+ Notify.success(res.info, undefined, true);
d.rows_cnt = res.data.total_rows;
t.unload(i);
t.setInode(i);
diff --git a/web/pgadmin/browser/static/js/node_view.jsx b/web/pgadmin/browser/static/js/node_view.jsx
index d44188451..f14807a3e 100644
--- a/web/pgadmin/browser/static/js/node_view.jsx
+++ b/web/pgadmin/browser/static/js/node_view.jsx
@@ -210,6 +210,7 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo
key={itemNodeData?._id}
formType={formType}
getInitData={initData}
+ updatedData={{rows_cnt: itemNodeData?.rows_cnt}}
schema={schema}
viewHelperProps={viewHelperProps}
onSave={onSaveClick}
diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx
index b84d1e8aa..0cd4c353e 100644
--- a/web/pgadmin/static/js/SchemaView/index.jsx
+++ b/web/pgadmin/static/js/SchemaView/index.jsx
@@ -866,7 +866,7 @@ const usePropsStyles = makeStyles((theme)=>({
/* If its the properties tab */
function SchemaPropertiesView({
- getInitData, viewHelperProps, schema={}, ...props}) {
+ getInitData, viewHelperProps, schema={}, updatedData, ...props}) {
const classes = usePropsStyles();
let defaultTab = 'General';
let tabs = {};
@@ -890,6 +890,14 @@ function SchemaPropertiesView({
});
}, []);
+ useEffect(()=>{
+ if(updatedData) {
+ setOrigData(prevData => ({
+ ...prevData,
+ ...updatedData
+ }));
+ }
+ },[updatedData]);
/* A simple loop to get all the controls for the fields */
schema.fields.forEach((field)=>{
@@ -1008,6 +1016,7 @@ function SchemaPropertiesView({
SchemaPropertiesView.propTypes = {
getInitData: PropTypes.func.isRequired,
+ updatedData: PropTypes.object,
viewHelperProps: PropTypes.shape({
mode: PropTypes.string.isRequired,
serverInfo: PropTypes.shape({
diff --git a/web/pgadmin/static/js/helpers/Notifier.jsx b/web/pgadmin/static/js/helpers/Notifier.jsx
index bc47bb638..f336e6517 100644
--- a/web/pgadmin/static/js/helpers/Notifier.jsx
+++ b/web/pgadmin/static/js/helpers/Notifier.jsx
@@ -26,6 +26,7 @@ import pgWindow from 'sources/window';
import ModalProvider, { useModal } from './ModalProvider';
const AUTO_HIDE_DURATION = 3000; // In milliseconds
+const PERSIST_SNACK_BAR = false; // Snackbar stays on the screen, unless it is dismissed
let snackbarRef;
let notifierInitialized = false;
@@ -119,34 +120,35 @@ AlertContent.propTypes = {
let Notifier = {
- success(msg, autoHideDuration = AUTO_HIDE_DURATION) {
- this._callNotify(msg, MESSAGE_TYPE.SUCCESS, autoHideDuration);
+ success(msg, autoHideDuration = AUTO_HIDE_DURATION, persist = PERSIST_SNACK_BAR) {
+ this._callNotify(msg, MESSAGE_TYPE.SUCCESS, autoHideDuration, persist);
},
- warning(msg, autoHideDuration = AUTO_HIDE_DURATION) {
- this._callNotify(msg, MESSAGE_TYPE.WARNING, autoHideDuration);
+ warning(msg, autoHideDuration = AUTO_HIDE_DURATION, persist = PERSIST_SNACK_BAR) {
+ this._callNotify(msg, MESSAGE_TYPE.WARNING, autoHideDuration, persist);
},
- info(msg, autoHideDuration = AUTO_HIDE_DURATION) {
- this._callNotify(msg, MESSAGE_TYPE.INFO, autoHideDuration);
+ info(msg, autoHideDuration = AUTO_HIDE_DURATION, persist = PERSIST_SNACK_BAR) {
+ this._callNotify(msg, MESSAGE_TYPE.INFO, autoHideDuration, persist);
},
- error(msg, autoHideDuration = AUTO_HIDE_DURATION) {
- this._callNotify(msg, MESSAGE_TYPE.ERROR, autoHideDuration);
+ error(msg, autoHideDuration = AUTO_HIDE_DURATION, persist = PERSIST_SNACK_BAR) {
+ this._callNotify(msg, MESSAGE_TYPE.ERROR, autoHideDuration, persist);
},
- notify(content, autoHideDuration) {
+ notify(content, autoHideDuration, persist) {
if (content) {
if(!notifierInitialized) {
initializeNotifier();
}
let options = {autoHideDuration, content:(key) => (
{React.cloneElement(content, {onClose:()=>{snackbarRef.closeSnackbar(key);}})}
- )};
+ ), persist};
options.content.displayName = 'content';
snackbarRef.enqueueSnackbar(null, options);
}
},
- _callNotify(msg, type, autoHideDuration) {
+ _callNotify(msg, type, autoHideDuration, persist) {
this.notify(
,
- autoHideDuration
+ autoHideDuration,
+ persist
);
},