diff --git a/esp/src/src-react/components/forms/Fields.tsx b/esp/src/src-react/components/forms/Fields.tsx index f7c435b1129..5e2213ba7fd 100644 --- a/esp/src/src-react/components/forms/Fields.tsx +++ b/esp/src/src-react/components/forms/Fields.tsx @@ -831,7 +831,7 @@ export const CloudContainerNameField: React.FunctionComponent; + return ; }; const states = Object.keys(States).map(s => States[s]); diff --git a/esp/src/src-react/components/forms/ZAPDialog.tsx b/esp/src/src-react/components/forms/ZAPDialog.tsx index 679c0b8a3a7..8d728ae5f8a 100644 --- a/esp/src/src-react/components/forms/ZAPDialog.tsx +++ b/esp/src/src-react/components/forms/ZAPDialog.tsx @@ -620,15 +620,22 @@ export const ZAPDialog: React.FunctionComponent = ({ { - 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) =>