Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getting Vue dom elements #1610

Merged
merged 2 commits into from Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/@headlessui-vue/CHANGELOG.md
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `by` prop for `Listbox`, `Combobox` and `RadioGroup` ([#1482](https://github.com/tailwindlabs/headlessui/pull/1482))
- Add `@headlessui/tailwindcss` plugin ([#1487](https://github.com/tailwindlabs/headlessui/pull/1487))

### Fixed

- Fix getting Vue dom elements ([#1610](https://github.com/tailwindlabs/headlessui/pull/1610))

## [1.6.5] - 2022-06-20

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-vue/src/utils/dom.ts
Expand Up @@ -4,5 +4,5 @@ export function dom<T extends Element | ComponentPublicInstance>(ref?: Ref<T | n
if (ref == null) return null
if (ref.value == null) return null

return '$el' in ref.value ? (ref.value.$el as T | null) : ref.value
return (ref.value as { $el?: T }).$el ?? ref.value
}