Fixed an issue where the tree is not scrolling to the object selected from the search result. Fixes #6828

This commit is contained in:
Khushboo Vashi 2021-10-07 17:23:21 +05:30 committed by Akshay Joshi
parent d65930a8a6
commit 9796f50362
3 changed files with 6 additions and 2 deletions

View File

@ -18,3 +18,4 @@ Bug fixes
*********
| `Issue #6797 <https://redmine.postgresql.org/issues/6797>`_ - Remove an extra blank line at the start of the SQL for function, procedure, and trigger function.
| `Issue #6828 <https://redmine.postgresql.org/issues/6828>`_ - Fixed an issue where the tree is not scrolling to the object selected from the search result.

View File

@ -73,10 +73,11 @@ var initBrowserTree = async (pgBrowser) => {
await treeModelX.root.ensureLoaded()
let tree_height = window.outerHeight - 300;
// Render Browser Tree
await render(
<div>
<FileTreeX height={950} width={'100%'} model={treeModelX}
<FileTreeX height={tree_height} width={'100%'} model={treeModelX}
onReady={itemHandle} create={create} remove={remove} update={update}/>
</div>, document.getElementById('tree'));
}

View File

@ -288,7 +288,9 @@ export default class SearchObjectsDialogWrapper extends DialogWrapper {
this.showMessage(gettext('Locating...'));
tree.findNodeWithToggle(rowData.id_path)
.then((treeItem)=>{
tree.select(treeItem, true);
setTimeout(() => {
tree.select(treeItem, true);
}, 100);
this.showMessage(null);
})
.catch((error)=>{