fix incorrect checkbox state logic in extension selector (#7387)

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
Ocheretovich
2026-03-03 22:51:36 +02:00
committed by GitHub
parent c12bee7571
commit 40cca9f570

View File

@@ -424,9 +424,9 @@ export const AddExtensionSelector = ({
const totalCount = categoryExtensions.length; const totalCount = categoryExtensions.length;
const selectedCount = countSelectedInCategory(categoryId); const selectedCount = countSelectedInCategory(categoryId);
if (selectedCount === 0) return 'checked'; if (selectedCount === 0) return 'unchecked';
if (selectedCount === totalCount) return 'indeterminate'; if (selectedCount === totalCount) return 'checked';
return 'indeterminate'; return 'indeterminate';
}; };
// Update the useEffect to use the new hasMatchingExtensions // Update the useEffect to use the new hasMatchingExtensions