mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
UI: Compare newly selected label with current label to determine if deselecting (#12265)
## Addresses #12251 https://loom.com/share/1d3e09ad320f4f069316f120014eaf2c - [x] Manual QA Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
parent
ed92176194
commit
b7acae39bb
@ -498,11 +498,10 @@ const ManageHostsPage = ({
|
||||
(hostsData?.hosts?.length || 0) >=
|
||||
hostsCount;
|
||||
|
||||
const handleLabelChange = ({ slug }: ILabel): boolean => {
|
||||
const handleLabelChange = ({ slug, id: newLabelId }: ILabel): boolean => {
|
||||
const { MANAGE_HOSTS } = PATHS;
|
||||
|
||||
const isDeselectingLabel =
|
||||
labelID && labelID === selectedLabel?.id.toString();
|
||||
const isDeselectingLabel = newLabelId && newLabelId === selectedLabel?.id;
|
||||
|
||||
// Non-status labels are not compatible with policies or software filters
|
||||
// so omit policies and software params from next location
|
||||
|
Loading…
Reference in New Issue
Block a user