mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-09 23:15:58 -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) {
|
||||
return (matchPath !== undefined && path !== undefined
|
||||
&& (basepath.startsWith(matchPath) || path === matchPath));
|
||||
&& (basepath.startsWith(`${matchPath}/`) || path === matchPath));
|
||||
};
|
||||
|
||||
return (function findInNode(currentNode) {
|
||||
|
@ -973,7 +973,7 @@ class ERDTool extends React.Component {
|
||||
<ERDCanvasSettings.Provider value={{
|
||||
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>
|
||||
</div>
|
||||
</Box>
|
||||
@ -1001,6 +1001,7 @@ ERDTool.propTypes = {
|
||||
pgAdmin: PropTypes.object.isRequired,
|
||||
panel: PropTypes.object,
|
||||
classes: PropTypes.object,
|
||||
inTest: PropTypes.bool,
|
||||
};
|
||||
|
||||
export const ERDCanvasSettings = React.createContext({});
|
||||
|
@ -125,7 +125,7 @@ describe('ERDTool', ()=>{
|
||||
erd = mount(
|
||||
<Theme>
|
||||
<ModalProvider>
|
||||
<ERDTool params={params} pgAdmin={pgAdmin} pgWindow={pgWindow} />
|
||||
<ERDTool params={params} pgAdmin={pgAdmin} pgWindow={pgWindow} isTest={true} />
|
||||
</ModalProvider>
|
||||
</Theme>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user