diff --git a/web/pgadmin/static/js/SchemaView/FormView.jsx b/web/pgadmin/static/js/SchemaView/FormView.jsx index c85eb4742..ab8bc6772 100644 --- a/web/pgadmin/static/js/SchemaView/FormView.jsx +++ b/web/pgadmin/static/js/SchemaView/FormView.jsx @@ -71,7 +71,7 @@ SQLTab.propTypes = { getSQLValue: PropTypes.func.isRequired, }; -export function getFieldMetaData(field, schema, value, viewHelperProps) { +export function getFieldMetaData(field, schema, value, viewHelperProps, onlyModeCheck=false) { let retData = { readonly: false, disabled: false, @@ -89,6 +89,10 @@ export function getFieldMetaData(field, schema, value, viewHelperProps) { return retData; } + if(onlyModeCheck) { + return retData; + } + let {visible, disabled, readonly} = field; let verInLimit = (_.isUndefined(viewHelperProps.serverInfo) ? true : diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index 8887d93c0..1c11acfe9 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -136,7 +136,9 @@ function getChangedData(topSchema, viewHelperProps, sessData, stringify=false) { /* Will be called recursively as data can be nested */ const parseChanges = (schema, accessPath, changedData)=>{ schema.fields.forEach((field)=>{ - let {modeSupported} = getFieldMetaData(field, schema, {}, viewHelperProps); + /* At this point the schema assignments like top may not have been done + So, only check the mode by passing true to getFieldMetaData */ + let {modeSupported} = getFieldMetaData(field, schema, {}, viewHelperProps, true); if(!modeSupported) { return; } diff --git a/web/pgadmin/static/js/helpers/DataGridViewWithHeaderForm.jsx b/web/pgadmin/static/js/helpers/DataGridViewWithHeaderForm.jsx index 547cb3f8b..c1cd045e9 100644 --- a/web/pgadmin/static/js/helpers/DataGridViewWithHeaderForm.jsx +++ b/web/pgadmin/static/js/helpers/DataGridViewWithHeaderForm.jsx @@ -73,7 +73,7 @@ export default function DataGridViewWithHeaderForm(props) { } - + ); }