diff --git a/web/pgadmin/static/js/SchemaView/DataGridView.jsx b/web/pgadmin/static/js/SchemaView/DataGridView.jsx index 8083ad2dd..0f657f41d 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView.jsx @@ -199,15 +199,8 @@ export default function DataGridView({ let columns = useMemo( ()=>{ let cols = []; - let colInfo = { - Cell: ()=>{}, - }; - colInfo.Cell.displayName = 'Cell', - colInfo.Cell.propTypes = { - row: PropTypes.object.isRequired, - }; if(props.canEdit) { - colInfo = { + let colInfo = { Header: <> , id: 'btn-edit', accessor: ()=>{}, @@ -228,10 +221,14 @@ export default function DataGridView({ />; } }; + colInfo.Cell.displayName = 'Cell', + colInfo.Cell.propTypes = { + row: PropTypes.object.isRequired, + }; cols.push(colInfo); } if(props.canDelete) { - colInfo = { + let colInfo = { Header: <> , id: 'btn-delete', accessor: ()=>{}, @@ -261,6 +258,10 @@ export default function DataGridView({ ); } }; + colInfo.Cell.displayName = 'Cell', + colInfo.Cell.propTypes = { + row: PropTypes.object.isRequired, + }; cols.push(colInfo); } diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index d221fcd97..3448c8b07 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -108,7 +108,7 @@ function getChangedData(topSchema, mode, sessData, stringify=false) { /* Will be called recursively as data can be nested */ const parseChanges = (schema, accessPath, changedData)=>{ schema.fields.forEach((field)=>{ - if(field.type === 'nested-tab') { + if((field.type||'').startsWith('nested-')) { /* its nested */ parseChanges(field.schema, accessPath, changedData); } else {