mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-28 19:43:51 -06:00
Fixed an issue where properties tab was refreshing on tab change even if the selected node is same. #5536
This commit is contained in:
parent
799b6d8f7c
commit
3f0eee4c39
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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}) {
|
||||
|
Loading…
Reference in New Issue
Block a user