diff --git a/docs/guide/inputs.md b/docs/guide/inputs.md index 927221b..444f9f8 100644 --- a/docs/guide/inputs.md +++ b/docs/guide/inputs.md @@ -31,7 +31,7 @@ `FormSelect` extends `FormInput` props and adds the following options: - `options` Key-value object for select options. - `multiple` Boolean for multiple select. -- `empty` Boolean to allow empty value +- `empty` String with the empty label. Allows empty select ### Example ```VUE diff --git a/package.json b/package.json index f104c28..934057a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@wgr-sa/nuxt-form", "description": "Form builder for Nuxt", - "version": "0.9.1", + "version": "0.9.2", "repository": "https://github.com/WGR-SA/nuxt-form.git", "author": "jeanvier", "license": "MIT", diff --git a/playground/app.vue b/playground/app.vue index b3cecad..01c0222 100644 --- a/playground/app.vue +++ b/playground/app.vue @@ -19,8 +19,14 @@ import { max } from 'class-validator'; name="asdf" :rules="[ 'isEmail']" /> --> - - + + diff --git a/src/runtime/components/FormSelect.vue b/src/runtime/components/FormSelect.vue index 00470f7..7d96dab 100644 --- a/src/runtime/components/FormSelect.vue +++ b/src/runtime/components/FormSelect.vue @@ -14,6 +14,7 @@ const props = defineProps<{ disabled?: boolean, value?: string, placeholder?: string, + empty?: string, }>() const form = inject('form') as Form @@ -28,6 +29,7 @@ const required = computed(() => props.required ?? false) :disabled="disabled" :multiple="multiple" > +