mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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))]);
 | 
					    }, [JSON.stringify(Array.from(applications))]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const allSelected = selectedApplications.length === applications.size;
 | 
					    const allSelected = [...applications].every((element) =>
 | 
				
			||||||
 | 
					        selectedApplications.includes(element),
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const { featureMetrics } = useFeatureMetricsRaw(featureId, hoursBack);
 | 
					    const { featureMetrics } = useFeatureMetricsRaw(featureId, hoursBack);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -50,7 +50,9 @@ export const FeatureMetricsChips = ({
 | 
				
			|||||||
    const onClick = (value: string) => () => {
 | 
					    const onClick = (value: string) => () => {
 | 
				
			||||||
        toggleValue(value);
 | 
					        toggleValue(value);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    const allSelected = values.size === selectedValues.length;
 | 
					    const allSelected = [...values].every((element) =>
 | 
				
			||||||
 | 
					        selectedValues.includes(element),
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const sortedValues = useMemo(() => {
 | 
					    const sortedValues = useMemo(() => {
 | 
				
			||||||
        return Array.from(values).sort((valueA, valueB) => {
 | 
					        return Array.from(values).sort((valueA, valueB) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user