ui icon indicating copy to clipboard operation
ui copied to clipboard

<USelectMenu> Options Menu Transition Update

Open Trixpua opened this issue 1 year ago • 3 comments

Description

Using the label slot to make a custom label when more items are selected the input wrap, but the menu don't update the 'translate' value, if reopen the options menu it update.

Is possible update the the transition (transform: translate) of the options menu when new item is selected?

https://stackblitz.com/edit/nuxt-ui-r35jcp?file=app.vue

Trixpua avatar Mar 15 '24 13:03 Trixpua

This could be (correct me if I'm wrong) and upstream issue related to Popper not being reactive.

I remember having a similar issue when using HeadlessUI and Popper way before Nuxt UI was publicly available

sandros94 avatar Mar 22 '24 10:03 sandros94

I'm having a (somewhat) similar problem with UPopover. In my case, the data is loaded after the user hovers over the element, but when its contents update the Popover's position is not updated.

From the docs, you can force an update using the update() method from Popper. Would it be possible to expose its instance in some way, e.g. as state that can be read with a ref? https://popper.js.org/docs/v2/lifecycle/#manual-update

ewsbr avatar May 12 '24 00:05 ewsbr

The current work for #1289 will drop the support for Popper in favor of radix-vue's popover. While theoretically the popper instance could be exposed via a template ref, adding such a feature and then removing it could add some misunderstanding.

@benjamincanac WDYT?

sandros94 avatar May 12 '24 17:05 sandros94