fix(ui) : SelectCheckbox tolère modelValue absent (défaut []) — corrige crash SSR readonly

Le composant accédait à props.modelValue.length sans garde alors que modelValue
était requis ; un usage non bindé (ex. page playground readonly) plantait le rendu SSR.
modelValue devient optionnel avec défaut [].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 16:24:19 +02:00
parent cec528eac6
commit 801925c443
2 changed files with 16 additions and 3 deletions
@@ -244,7 +244,7 @@ type Option = {
value: string | number
}
const props = withDefaults(defineProps<{
modelValue: Array<string | number>
modelValue?: Array<string | number>
options?: Option[]
emptyOptionLabel?: string
label?: string
@@ -264,6 +264,7 @@ const props = withDefaults(defineProps<{
noOptionsText?: string
required?: boolean
}>(), {
modelValue: () => [],
options: () => [],
emptyOptionLabel: '',
label: '',