Akryum / Akryum/floating-vue

Position of dropdown popper is fixed when the reference element's height is dynamically changed

未關閉
#977 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
3.5k
分支
341
平均合併
14 分鐘
30 天內合併 PR
8

描述

Hi there,

Thank you for your hard work on the project. I have a few questions that I was hoping you could clarify for me.

**The issue**
I'm currently working on a project that involves using Vue with the VDropdown component. However, I've encountered a problem where the dropdown position does not update when the height of the reference element changes dynamically. In my specific case:
- The reference element has a CSS-defined max-height of 100px.
- The height of the reference element varies based on its content.
- I want the dropdown position to recalculate whenever the height of the reference element changes.

Unfortunately, it seems that the popper remains fixed to its initial position and does not respond to the dynamic height changes of the reference element at all.

**Video**

https://github.com/Akryum/floating-vue/assets/49337640/85ed9044-5343-4cc9-b2db-750802bd99ac

**Reproducible code sandbox**
https://codesandbox.io/s/floating-vue-dynamic-height-reference-element-zdrr8p?file=/src/App.vue

I'm wondering if you have any insights into resolving this problem. I came across the autoUpdate feature from floating-ui (https://floating-ui.com/docs/autoupdate) and was considering whether setting up an event listener with autoUpdate could be the solution.

Thank you in advance.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。