ui icon indicating copy to clipboard operation
ui copied to clipboard

Drawer is not unmounted when closed

Open ahoiroman opened this issue 9 months ago • 1 comments

Description

Hello everyone,

I am using a drawer like this:

const onViewDetails = () => {
  const drawer = overlay.create(TaskOverlay)

  drawer.open({
    project: props.project
  })
}

Now the problem is that I am using an event bus that is being used inside the onMounted() method:

onMounted(() => {
  $listen('task:updated', (taskId: string) => {
   console.log("Test")
   refresh()
  })
})

Now the question is: How can I unmount the drawer if it is closed? Once opened, the refresh event will be triggered, event if the drawer has been closed already.

Any idea how I could handle this?

ahoiroman avatar Apr 08 '25 12:04 ahoiroman

Possibly solved with https://github.com/nuxt/ui/pull/3829

ahoiroman avatar Apr 12 '25 13:04 ahoiroman

This should be resolved. We can re-open if its still an issue.

genu avatar May 01 '25 18:05 genu