Fixed scroll issue in the browser tree when navigating using the keyboard.

This commit is contained in:
Khushboo Vashi 2021-11-15 18:26:16 +05:30 committed by Akshay Joshi
parent 053519aef6
commit cc38bc132e
4 changed files with 8 additions and 8 deletions

View File

@ -136,7 +136,7 @@
"path-fx": "^2.0.0",
"pathfinding": "^0.4.18",
"paths-js": "^0.4.9",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#cfb580e396714dbdd941c64e0f90598ee478ea21",
"pgadmin4-tree": "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#90e62d4371d3d25a957b3ffc7c6cb81a928da06f",
"postcss": "^8.2.15",
"raf": "^3.4.1",
"react": "^17.0.1",

View File

@ -140,12 +140,12 @@ export class Tree {
await this.tree.toggleDirectory(item);
}
async select(item, ensureVisible=false) {
await this.tree.setActiveFile(item, ensureVisible);
async select(item, ensureVisible=false, align='auto') {
await this.tree.setActiveFile(item, ensureVisible, align);
}
async selectNode(item, ensureVisible=false) {
this.tree.setActiveFile(item, ensureVisible);
async selectNode(item, ensureVisible=false, align='auto') {
this.tree.setActiveFile(item, ensureVisible, align);
}
async unload(item) {

View File

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

View File

@ -7189,9 +7189,9 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
"pgadmin4-tree@git+https://github.com/EnterpriseDB/pgadmin4-treeview/#cfb580e396714dbdd941c64e0f90598ee478ea21":
"pgadmin4-tree@git+https://github.com/EnterpriseDB/pgadmin4-treeview/#90e62d4371d3d25a957b3ffc7c6cb81a928da06f":
version "1.0.0"
resolved "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#cfb580e396714dbdd941c64e0f90598ee478ea21"
resolved "git+https://github.com/EnterpriseDB/pgadmin4-treeview/#90e62d4371d3d25a957b3ffc7c6cb81a928da06f"
dependencies:
"@types/classnames" "^2.2.6"
"@types/react" "^16.7.18"