mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
fix: precise selected all chips check (#5945)
This commit is contained in:
parent
567099a15b
commit
f5cf118b12
@ -56,7 +56,9 @@ export const FeatureMetrics = () => {
|
||||
}
|
||||
}, [JSON.stringify(Array.from(applications))]);
|
||||
|
||||
const allSelected = selectedApplications.length === applications.size;
|
||||
const allSelected = [...applications].every((element) =>
|
||||
selectedApplications.includes(element),
|
||||
);
|
||||
|
||||
const { featureMetrics } = useFeatureMetricsRaw(featureId, hoursBack);
|
||||
|
||||
|
@ -50,7 +50,9 @@ export const FeatureMetricsChips = ({
|
||||
const onClick = (value: string) => () => {
|
||||
toggleValue(value);
|
||||
};
|
||||
const allSelected = values.size === selectedValues.length;
|
||||
const allSelected = [...values].every((element) =>
|
||||
selectedValues.includes(element),
|
||||
);
|
||||
|
||||
const sortedValues = useMemo(() => {
|
||||
return Array.from(values).sort((valueA, valueB) => {
|
||||
|
Loading…
Reference in New Issue
Block a user