Fixed an issue where properties tab was refreshing on tab change even if the selected node is same. #5536

This commit is contained in:
Pravesh Sharma 2022-12-14 12:48:24 +05:30 committed by GitHub
parent 799b6d8f7c
commit 3f0eee4c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -948,8 +948,6 @@ define('pgadmin.browser.node', [
// Callback to show object properties
let properties = function() {
/* Remove any dom rendered by getNodeView */
removeNodeView(j[0]);
let treeNodeInfo = pgBrowser.tree.getTreeNodeHierarchy(item);
getNodeView(
that.type, treeNodeInfo, 'properties', data, 'tab', j[0], this, onEdit

View File

@ -223,6 +223,7 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo
getSQLValue={getSQLValue}
disableSqlHelp={nodeObj.sqlAlterHelp == '' && nodeObj.sqlCreateHelp == '' && !nodeObj.epasHelp}
disableDialogHelp={nodeObj.dialogHelp == undefined || nodeObj.dialogHelp == ''}
itemNodeData={itemNodeData}
/>
</Theme>, container);
}

View File

@ -866,7 +866,7 @@ const usePropsStyles = makeStyles((theme)=>({
/* If its the properties tab */
function SchemaPropertiesView({
getInitData, viewHelperProps, schema={}, ...props}) {
getInitData, viewHelperProps, schema={}, itemNodeData, ...props}) {
const classes = usePropsStyles();
let defaultTab = 'General';
let tabs = {};
@ -888,7 +888,7 @@ function SchemaPropertiesView({
}).catch(()=>{
setLoaderText('');
});
}, [getInitData]);
}, [itemNodeData]);
/* A simple loop to get all the controls for the fields */
@ -1020,6 +1020,7 @@ SchemaPropertiesView.propTypes = {
onHelp: PropTypes.func,
disableSqlHelp: PropTypes.bool,
onEdit: PropTypes.func,
itemNodeData: PropTypes.object
};
export default function SchemaView({formType, ...props}) {