Fix collectable collection selecting initial items lazily

This commit is contained in:
schroda
2026-03-20 01:30:01 +01:00
parent 33c55f8b85
commit b63c8a548e
3 changed files with 13 additions and 6 deletions

View File

@@ -50,7 +50,7 @@ export function CheckboxListSetting<Item>({
const { selectedItemIds, handleSelection, handleSelectAll, reset } = useSelectableCollection(items.length, {
currentKey: 'default',
itemIds,
initialState: { default: currentSelectedItemIds },
initialState: useMemo(() => ({ default: currentSelectedItemIds }), [currentSelectedItemIds]),
});
const handleCancel = () => {