epicmaxco / vuestic-ui

Vuestic UI is an open-source Vue 3 component library designed for rapid development, easy maintenance, and high accessibility. Maintained by Epicmax (@epicmaxco).
https://vuestic.dev
MIT License
3.52k stars 340 forks source link

VaButtonDropdown: incorrect teleport element when split prop is true #4394

Closed m0ksem closed 1 month ago

m0ksem commented 1 month ago
          Hi, I'm using the same VaLayout as Vuestic Admin. The issue only seems to affect the VaButtonDropdown content. For example, this is a button placed at the left of the main content:
<VaButtonDropdown
  split
  preset="primary"
  label="Filter"
  size="small"
>
  // content is VaList as shown above
</VaButtonDropdown>

Elsewhere I'm using VaDropdown in a similar position to the left of the main content, and it doesn't have the same issue:

<VaDropdown trigger="hover" hover-over-timeout="100">
  <template #anchor>
    <VaButton
      size="small"
      preset="primary"
      border-color="secondary"
      icon="mso-more_vert"
    />
    </template>
        <VaDropdownContent>
            // content as shown below
        </VaDropdownContent>
</VaDropdown>

Which results in: image

I'm managing to workaround the issue by simply using placement="right-end" on the VaButtonDropdown.

Originally posted by @beard7 in https://github.com/epicmaxco/vuestic-admin/issues/1053#issuecomment-2413579418