Skip to content

Commit fde2983

Browse files
Merge pull request xiaoluoboding#76 from davidramosweb/fix/dismiss-maximum-recursive-updates-exceeded-in-component-toaster
fix(Toast): 🐛 move the heights update to Toaster.vue
2 parents 594d6fd + cbcffb8 commit fde2983

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

packages/Toast.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,6 @@ const deleteToast = () => {
269269
// Save the offset for the exit swipe animation
270270
removed.value = true
271271
offsetBeforeRemove.value = offset.value
272-
const newHeights = props.heights.filter(
273-
(height) => height.toastId !== props.toast.id
274-
)
275-
emit('update:heights', newHeights)
276272
277273
setTimeout(() => {
278274
emit('removeToast', props.toast)

packages/Toaster.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ const hotkeyLabel = props.hotkey
221221
.replace(/Digit/g, '')
222222
223223
function removeToast(toast: ToastT) {
224+
heights.value = heights.value.filter(({ toastId }) => toastId !== toast.id)
224225
toasts.value = toasts.value.filter(({ id }) => id !== toast.id)
225226
}
226227

0 commit comments

Comments
 (0)