Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/design-system/src/components/OcDrop/OcDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ const anchor = computed<HTMLElement | null>(() => {
})
let activeAnchorElement: HTMLElement | VirtualElement | null = null

const resetDropSize = () => {
Object.assign(unref(drop).style, { maxWidth: '', maxHeight: '' })
}

const show = async ({
anchorElement = undefined,
noFocus = false
Expand Down Expand Up @@ -224,6 +228,7 @@ const update = async ({
return
}
activeAnchorElement = anchorEl
resetDropSize()
const { x, y } = await computePosition(anchorEl, unref(drop), {
placement: position,
middleware: [
Expand Down Expand Up @@ -294,6 +299,7 @@ const showDrop = async ({
})
}

resetDropSize()
const { x, y } = await computePosition(anchorEl, unref(drop), {
placement: position,
middleware: [
Expand Down