Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(ui): preserve uncontrolled select model values

Timothy Yin7bdc53e05b17
diff --git a/apps/cloud/app/components/ui/select/CloudSelect.vue b/apps/cloud/app/components/ui/select/CloudSelect.vue
index b14dc7a6..1cf9869e 100644
--- a/apps/cloud/app/components/ui/select/CloudSelect.vue
+++ b/apps/cloud/app/components/ui/select/CloudSelect.vue
@@ -1,5 +1,9 @@
<script setup lang="ts">
-const props = defineProps<{ value?: string | number | boolean | null }>()
+// Keep an omitted Boolean-union prop distinct from an explicitly controlled false.
+const props = withDefaults(
+ defineProps<{ value?: string | number | boolean | null }>(),
+ { value: undefined },
+)
const model = defineModel<string | number | boolean | null>()
// Preserve native controlled-value forms as well as v-model consumers.
const selected = computed({