Fix: Labels for Node Selector in Pod Placement (#2320)
Enabling/disabling buttons correctly in pod placement > labels to be consistent with all other screens in the application Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
@@ -417,25 +417,25 @@ const Affinity = ({ classes }: IAffinityProps) => {
|
||||
|
||||
dispatch(setKeyValuePairs(arrCp));
|
||||
}}
|
||||
disabled={i !== keyValuePairs.length - 1}
|
||||
>
|
||||
<AddIcon />
|
||||
</IconButton>
|
||||
</div>
|
||||
{keyValuePairs.length > 1 && (
|
||||
<div className={classes.overlayAction}>
|
||||
<IconButton
|
||||
size={"small"}
|
||||
onClick={() => {
|
||||
const arrCp = keyValuePairs.filter(
|
||||
(item, index) => index !== i
|
||||
);
|
||||
dispatch(setKeyValuePairs(arrCp));
|
||||
}}
|
||||
>
|
||||
<RemoveIcon />
|
||||
</IconButton>
|
||||
</div>
|
||||
)}
|
||||
<div className={classes.overlayAction}>
|
||||
<IconButton
|
||||
size={"small"}
|
||||
onClick={() => {
|
||||
const arrCp = keyValuePairs.filter(
|
||||
(item, index) => index !== i
|
||||
);
|
||||
dispatch(setKeyValuePairs(arrCp));
|
||||
}}
|
||||
disabled={keyValuePairs.length <= 1}
|
||||
>
|
||||
<RemoveIcon />
|
||||
</IconButton>
|
||||
</div>
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user