diff --git a/docs/en_US/release_notes_6_1.rst b/docs/en_US/release_notes_6_1.rst index d5ef7f7cb..fe26557e7 100644 --- a/docs/en_US/release_notes_6_1.rst +++ b/docs/en_US/release_notes_6_1.rst @@ -28,3 +28,4 @@ Bug fixes | `Issue #6828 `_ - Fixed an issue where the tree is not scrolling to the object selected from the search result. | `Issue #6881 `_ - Fixed an issue where the browser tree doesn't show all contents on changing resolution. | `Issue #6882 `_ - Ensure that columns should be displayed in the order of creation instead of alphabetical order in the browser tree. +| `Issue #6900 `_ - Fixed an issue where exclusion constraint cannot be created from table dialog if the access method name is changed once. diff --git a/web/pgadmin/static/js/SchemaView/DepListener.js b/web/pgadmin/static/js/SchemaView/DepListener.js index 84fdf77be..dd3418b1b 100644 --- a/web/pgadmin/static/js/SchemaView/DepListener.js +++ b/web/pgadmin/static/js/SchemaView/DepListener.js @@ -47,8 +47,9 @@ export default class DepListener { /* Called when any field changed and trigger callbacks */ getDepChange(currPath, state, actionObj) { - if(actionObj.depChangeResolved) { - state = this._getListenerData(state, {callback: actionObj.depChangeResolved}, actionObj); + /* If this comes from deferred change */ + if(actionObj.listener?.callback) { + state = this._getListenerData(state, actionObj.listener, actionObj); } else { let allListeners = _.filter(this._depListeners, (entry)=>_.join(currPath, '|').startsWith(_.join(entry.source, '|'))); if(allListeners) { @@ -71,6 +72,7 @@ export default class DepListener { deferredList.push({ action: actionObj, promise: thePromise, + listener: listener, }); } } diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index d78ba7a7b..1f326f0da 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -313,7 +313,7 @@ const getDepChange = (currPath, newState, oldState, action)=>{ path: action.path, value: action.value, oldState: _.cloneDeep(oldState), - depChangeResolved: action.depChangeResolved, + listener: action.listener, }); } return newState; @@ -480,7 +480,10 @@ function SchemaDialogView({ type: SCHEMA_STATE_ACTIONS.DEFERRED_DEPCHANGE, path: item.action.path, depChange: item.action.depChange, - depChangeResolved: resFunc, + listener: { + ...item.listener, + callback: resFunc, + }, }); }); }