Skip to content

Commit

Permalink
Merge pull request #19294 from jeclrsg/hpcc-30254-zap-report-log-options
Browse files Browse the repository at this point in the history
HPCC-30254 ECL Watch v9 ZAP Report Container Name
  • Loading branch information
GordonSmith authored Nov 14, 2024
2 parents 718c934 + de6252b commit 2cb65fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion esp/src/src-react/components/forms/Fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ export const CloudContainerNameField: React.FunctionComponent<CloudContainerName
setOptions([{ key: "", text: "" }, ...options]);
}, [cloudContainerNames]);

return <ComboBox {...props} allowFreeform={true} autoComplete={"on"} options={options} />;
return <ComboBox {...props} allowFreeform={true} multiSelect autoComplete={"on"} options={options} />;
};

const states = Object.keys(States).map(s => States[s]);
Expand Down
17 changes: 12 additions & 5 deletions esp/src/src-react/components/forms/ZAPDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -620,15 +620,22 @@ export const ZAPDialog: React.FunctionComponent<ZAPDialogProps> = ({
<Controller
control={control} name="LogFilter.ComponentsFilter"
render={({
field: { onChange, name: fieldName }
field: { onChange, name: fieldName, value }
}) => <CloudContainerNameField
name={fieldName}
onChange={(_evt, option, _idx, value) => {
if (option?.key) {
onChange(option.key);
selectedKey={value}
onChange={(_evt, option, _idx, _value) => {
const selectedKeys = value ? [...value] : [];
const selected = option?.key ?? _value;
const index = selectedKeys.indexOf(selected.toString());

if (index === -1) {
selectedKeys.push(selected.toString());
} else {
onChange(value);
selectedKeys.splice(index, 1);
}

onChange(selectedKeys);
}}
onRenderLabel={(props: CustomLabelProps) => <CustomLabel
id={`${fieldName}_Label`}
Expand Down

0 comments on commit 2cb65fe

Please sign in to comment.