mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue in search objects where objects were unable to locate occasionally. #5916
This commit is contained in:
parent
fdf7a459eb
commit
a18d469c90
@ -348,7 +348,7 @@ export class Tree {
|
|||||||
|
|
||||||
let onCorrectPath = function (matchPath) {
|
let onCorrectPath = function (matchPath) {
|
||||||
return (matchPath !== undefined && path !== undefined
|
return (matchPath !== undefined && path !== undefined
|
||||||
&& (basepath.startsWith(matchPath) || path === matchPath));
|
&& (basepath.startsWith(`${matchPath}/`) || path === matchPath));
|
||||||
};
|
};
|
||||||
|
|
||||||
return (function findInNode(currentNode) {
|
return (function findInNode(currentNode) {
|
||||||
|
@ -973,7 +973,7 @@ class ERDTool extends React.Component {
|
|||||||
<ERDCanvasSettings.Provider value={{
|
<ERDCanvasSettings.Provider value={{
|
||||||
cardinality_notation: this.state.cardinality_notation
|
cardinality_notation: this.state.cardinality_notation
|
||||||
}}>
|
}}>
|
||||||
{this.diagram.getEngine() && <CanvasWidget className={this.props.classes.diagramCanvas} ref={(ele)=>{this.canvasEle = ele?.ref?.current;}} engine={this.diagram.getEngine()} />}
|
{!this.props.inTest && <CanvasWidget className={this.props.classes.diagramCanvas} ref={(ele)=>{this.canvasEle = ele?.ref?.current;}} engine={this.diagram.getEngine()} />}
|
||||||
</ERDCanvasSettings.Provider>
|
</ERDCanvasSettings.Provider>
|
||||||
</div>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
@ -1001,6 +1001,7 @@ ERDTool.propTypes = {
|
|||||||
pgAdmin: PropTypes.object.isRequired,
|
pgAdmin: PropTypes.object.isRequired,
|
||||||
panel: PropTypes.object,
|
panel: PropTypes.object,
|
||||||
classes: PropTypes.object,
|
classes: PropTypes.object,
|
||||||
|
inTest: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ERDCanvasSettings = React.createContext({});
|
export const ERDCanvasSettings = React.createContext({});
|
||||||
|
@ -125,7 +125,7 @@ describe('ERDTool', ()=>{
|
|||||||
erd = mount(
|
erd = mount(
|
||||||
<Theme>
|
<Theme>
|
||||||
<ModalProvider>
|
<ModalProvider>
|
||||||
<ERDTool params={params} pgAdmin={pgAdmin} pgWindow={pgWindow} />
|
<ERDTool params={params} pgAdmin={pgAdmin} pgWindow={pgWindow} isTest={true} />
|
||||||
</ModalProvider>
|
</ModalProvider>
|
||||||
</Theme>
|
</Theme>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user