Skip to content

Commit 5dd07d5

Browse files
Fixed an issue where double click to open a file in the file manager is not working. #9196
1 parent 491fbe8 commit 5dd07d5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

docs/en_US/release_notes_9_12.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Housekeeping
2929
Bug fixes
3030
*********
3131

32+
| `Issue #9196 <https://github.com/pgadmin-org/pgadmin4/issues/9196>`_ - Fixed an issue where double click to open a file in the file manager is not working.
3233
| `Issue #9380 <https://github.com/pgadmin-org/pgadmin4/issues/9380>`_ - Fixed an issue where the Query History panel would auto-scroll to the top and did not preserve the scroll bar position for the selected entry.
3334
3435

web/pgadmin/misc/file_manager/static/js/components/FileManager.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ export default function FileManager({params, closeModal, onOK, onCancel, sharedS
690690
const onItemEnter = useCallback(async (row)=>{
691691
if(row.file_type == 'dir' || row.file_type == 'drive') {
692692
await openDir(row.Path, selectedSS);
693-
} else if(params.dialog_type == 'select_file') {
693+
} else if(params.dialog_type == 'select_file' || params.dialog_type == 'open_file') {
694694
onOkClick();
695695
}
696696
}, [finalItems]);

web/pgadmin/static/js/components/PgReactDataGrid.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ export function CustomRow({inTest=false, ...props}) {
113113
props.onRowClick?.(args.row);
114114
};
115115

116-
const onCellDoubleClick = (args) => {
116+
const onCellDoubleClick = (args, e) => {
117+
// check if grid default is prevented.
118+
props.onCellDoubleClick?.(args, e);
119+
if(e.isGridDefaultPrevented()) return;
117120
gridUtils.onItemEnter?.(args.row);
118121
};
119122

0 commit comments

Comments
 (0)