Fix(settings): selection reactivity #184

Merged
jakob.scheid merged 2 commits from fix/selection-setting-reactivity into main 2026-08-06 23:41:53 +02:00
Showing only changes of commit 1f51a0b3ae - Show all commits
@@ -54,10 +54,9 @@ const props = defineProps({
const store = useSettingsStore();
const optionType = computed(() => props.setting.allowMultiple ? 'checkbox' : 'radio');
const selected = ref(normalizeSelectedValue(store.get(props.path) ?? props.setting.default));
watch(selected, (newValue) => {
store.set(props.path, newValue);
const selected = computed({
get: () => normalizeSelectedValue(store.get(props.path) ?? props.setting.default),
set: (value) => store.set(props.path, value)
});
const labelId = useId();