Skip to content

Commit 90aa478

Browse files
Fix getting Vue dom elements (#1610)
* Fix getting Vue dom elements * update changelog Co-authored-by: Robin Malfait <[email protected]>
1 parent bc0b64a commit 90aa478

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/@headlessui-vue/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Add `by` prop for `Listbox`, `Combobox` and `RadioGroup` ([#1482](https://github.com/tailwindlabs/headlessui/pull/1482))
1313
- Add `@headlessui/tailwindcss` plugin ([#1487](https://github.com/tailwindlabs/headlessui/pull/1487))
1414

15+
### Fixed
16+
17+
- Fix getting Vue dom elements ([#1610](https://github.com/tailwindlabs/headlessui/pull/1610))
18+
1519
## [1.6.5] - 2022-06-20
1620

1721
### Fixed

packages/@headlessui-vue/src/utils/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export function dom<T extends Element | ComponentPublicInstance>(ref?: Ref<T | n
44
if (ref == null) return null
55
if (ref.value == null) return null
66

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

0 commit comments

Comments
 (0)