Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/content/2.composables/use-overlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Update an overlay using its `id`
- `id`: The identifier of the overlay
- `props`: An object of props to update on the rendered component.

### `unMount(id: symbol): void`
### `unmount(id: symbol): void`

Removes the overlay from the DOM using its `id`

Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/OverlayProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import { computed } from 'vue'
import { useOverlay, type Overlay } from '../composables/useOverlay'

const { overlays, unMount, close } = useOverlay()
const { overlays, unmount, close } = useOverlay()

const mountedOverlays = computed(() => overlays.filter((overlay: Overlay) => overlay.isMounted))

const onAfterLeave = (id: symbol) => {
close(id)
unMount(id)
unmount(id)
}

const onClose = (id: symbol, value: any) => {
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/composables/useOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function _useOverlay() {
overlays.forEach(overlay => close(overlay.id))
}

const unMount = (id: symbol): void => {
const unmount = (id: symbol): void => {
const overlay = getOverlay(id)

overlay.isMounted = false
Expand Down Expand Up @@ -135,7 +135,7 @@ function _useOverlay() {
closeAll,
create,
patch,
unMount,
unmount,
isOpen
}
}
Expand Down