Skip to content

Commit

Permalink
fix v-model typescript error (#461)
Browse files Browse the repository at this point in the history
* fix v-model typescript error

* update changelog

Fixes: #368
Fixes: #457
Closes: #459

Co-authored-by: Andrea Nanni <[email protected]>
  • Loading branch information
RobinMalfait and ananni13 authored Apr 28, 2021
1 parent cddcd29 commit f385499
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixes

- Fix form submission within Dialog ([#460](https://github.com/tailwindlabs/headlessui/pull/460))
- Fix TypeScript types for `Listbox` and `Switch` ([#459](https://github.com/tailwindlabs/headlessui/pull/459), [#461](https://github.com/tailwindlabs/headlessui/pull/461))

## [@headlessui/react@v1.1.0] - 2021-04-26

Expand Down
4 changes: 2 additions & 2 deletions packages/@headlessui-vue/src/components/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export let Listbox = defineComponent({
props: {
as: { type: [Object, String], default: 'template' },
disabled: { type: [Boolean], default: false },
modelValue: { type: [Object, String, Number, Boolean], default: null },
modelValue: { type: [Object, String, Number, Boolean] },
},
setup(props, { slots, attrs, emit }) {
let { modelValue, disabled, ...passThroughProps } = props
Expand Down Expand Up @@ -445,7 +445,7 @@ export let ListboxOption = defineComponent({
name: 'ListboxOption',
props: {
as: { type: [Object, String], default: 'li' },
value: { type: [Object, String], default: null },
value: { type: [Object, String] },
disabled: { type: Boolean, default: false },
class: { type: [String, Function], required: false },
className: { type: [String, Function], required: false },
Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-vue/src/components/switch/switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export let Switch = defineComponent({
emits: ['update:modelValue'],
props: {
as: { type: [Object, String], default: 'button' },
modelValue: { type: [Object, Boolean], default: null },
modelValue: { type: Boolean, default: false },
class: { type: [String, Function], required: false },
className: { type: [String, Function], required: false },
},
Expand Down

0 comments on commit f385499

Please sign in to comment.