mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +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
1 changed files with 2 additions and 3 deletions
|
|
@ -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 a new issue