diff --git a/esp/src/eclwatch/LZBrowseWidget.js b/esp/src/eclwatch/LZBrowseWidget.js index c267aa53497..34e62d5b4b6 100644 --- a/esp/src/eclwatch/LZBrowseWidget.js +++ b/esp/src/eclwatch/LZBrowseWidget.js @@ -72,6 +72,8 @@ define([ serverFilterSelect: null, replicateEnabled: null, + dzExpanded: "", + postCreate: function (args) { this.inherited(arguments); this.sprayFixedForm = registry.byId(this.id + "SprayFixedForm"); @@ -708,6 +710,13 @@ define([ displayName: tree({ label: this.i18n.Name, sortable: false, + shouldExpand: function (row, level) { + if ((context.dzExpanded === "" || context.dzExpanded === row.data.DropZone?.Name) && level <= 1) { + context.dzExpanded = row.data.DropZone.Name; + return true; + } + return false; + }, formatter: function (_name, row) { var img = ""; var name = _name; diff --git a/esp/src/src-react/components/LandingZone.tsx b/esp/src/src-react/components/LandingZone.tsx index 370a0cfe4d1..ea19f848aad 100644 --- a/esp/src/src-react/components/LandingZone.tsx +++ b/esp/src/src-react/components/LandingZone.tsx @@ -74,6 +74,8 @@ interface LandingZoneProps { filter?: LandingZoneFilter; } +let dzExpanded = ""; + export const LandingZone: React.FunctionComponent = ({ filter = emptyFilter }) => { @@ -113,7 +115,7 @@ export const LandingZone: React.FunctionComponent = ({ filename: "landingZones", getSelected: function () { if (filter?.__dropZone) { - return this.inherited(arguments, [FileSpray.CreateLandingZonesFilterStore({})]); + return this.inherited(arguments, [FileSpray.CreateLandingZonesFilterStore({ dropZone: filter.__dropZone })]); } return this.inherited(arguments, [FileSpray.CreateFileListStore({})]); }, @@ -136,6 +138,13 @@ export const LandingZone: React.FunctionComponent = ({ displayName: tree({ label: nlsHPCC.Name, sortable: false, + shouldExpand: function (row, level) { + if ((dzExpanded === "" || dzExpanded === row.data.DropZone?.Name) && level <= 1) { + dzExpanded = row.data.DropZone.Name; + return true; + } + return false; + }, formatter: function (_name, row) { let img = ""; let name = row.displayName;