@redseed/redseed-ui-vue3 2.18.2 → 2.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "2.18.2",
3
+ "version": "2.18.3",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
- import { ref, computed, onMounted, onUnmounted, watchEffect } from 'vue'
3
- import { onClickOutside, useResizeObserver, useElementBounding } from '@vueuse/core'
2
+ import { ref, onMounted, onUnmounted } from 'vue'
3
+ import { onClickOutside, useElementBounding } from '@vueuse/core'
4
4
  import FormFieldSlot from './FormFieldSlot.vue'
5
5
  import { ChevronDownIcon, CheckIcon } from '@heroicons/vue/24/outline'
6
6
 
@@ -46,14 +46,6 @@ const dropdownElement = ref(null)
46
46
 
47
47
  onClickOutside(formFieldSelectElement, () => close())
48
48
 
49
- // useResizeObserver(formFieldSelectElement, (entries) => {
50
- // const entry = entries[0]
51
- // const { width } = entry.contentRect
52
- // dropdownWidth.value = width
53
- // })
54
-
55
- // watchEffect(() => calculateDropdownPosition())
56
-
57
49
  const selectElementBounding = useElementBounding(selectElement)
58
50
 
59
51
  function calculateDropdownPosition() {
@@ -85,6 +77,8 @@ function calculateDropdownPosition() {
85
77
 
86
78
  dropdownElement.value.style.width = `${selectElementBounding.width.value}px`
87
79
 
80
+ dropdownElement.value.style.left = `${selectElementBounding.left.value}px`
81
+
88
82
  if (spaceAboveSelectElement <= dropdownElementHeight
89
83
  && spaceBelowSelectElement <= dropdownElementHeight) {
90
84
  dropdownElement.value.style.top = '0'