diff --git a/package.json b/package.json index ecdc0dc..c2587ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@skillbill/vuelace-3", - "version": "1.1.9", + "version": "1.1.10", "private": false, "author": "skillbill", "license": "MIT", diff --git a/src/components/VLSelect/VLSelect.vue b/src/components/VLSelect/VLSelect.vue index e2a68a9..80e33e2 100644 --- a/src/components/VLSelect/VLSelect.vue +++ b/src/components/VLSelect/VLSelect.vue @@ -110,11 +110,13 @@ const options_dict = ref<{ [key: string]: string }>({}) const atChange = (evt: SlChangeEvent) => { const value = (evt.target as SlSelect)?.value - model.value = Array.isArray(value) - ? value.map((value) => options_dict.value[value]) - : value - ? options_dict.value[value] - : undefined + if (Array.isArray(value)) { + model.value = value.map((value) => options_dict.value[value]) + } else if (value) { + model.value = options_dict.value[value] + } else { + model.value = null + } emit('change', evt) }