Skip to content

Commit

Permalink
Merge pull request #17780 from jeclrsg/hpcc-30264-lz-filter-clash
Browse files Browse the repository at this point in the history
HPCC-30264 ECL Watch v9 fix Filter failure on Landing Zone

Reviewed-by: Gordon Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Sep 19, 2023
2 parents d521d3f + 3717a31 commit 99c9cdf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions esp/src/eclwatch/LZBrowseWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ define([
serverFilterSelect: null,
replicateEnabled: null,

dzExpanded: "",

postCreate: function (args) {
this.inherited(arguments);
this.sprayFixedForm = registry.byId(this.id + "SprayFixedForm");
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 10 additions & 1 deletion esp/src/src-react/components/LandingZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ interface LandingZoneProps {
filter?: LandingZoneFilter;
}

let dzExpanded = "";

export const LandingZone: React.FunctionComponent<LandingZoneProps> = ({
filter = emptyFilter
}) => {
Expand Down Expand Up @@ -113,7 +115,7 @@ export const LandingZone: React.FunctionComponent<LandingZoneProps> = ({
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({})]);
},
Expand All @@ -136,6 +138,13 @@ export const LandingZone: React.FunctionComponent<LandingZoneProps> = ({
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;
Expand Down

0 comments on commit 99c9cdf

Please sign in to comment.