nuxt / nuxt/ui

Toast: don't close toast on action button click

Open
#6,424 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream/reka-ui
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Package

v4.x

Description

There is no way to keep the toast open after an action button click.

I could be helpful to prevent this behavior by an option or by using preventDefault.

Nuxt UI is using ToastAction which surround slot with the ToastClose which automatically close the current toast.
I think, we need a change from Reka UI.

Additional context

Reproduction of the feature issue:
https://play.ui.nuxt.com/#eNp9VNuO0zAQ/ZVRXppKm7QLC0KhXbFbXnjalSgPiCDkTSbF4MSWL2WrKv/O2Gma0JbNxY5nzviM55J9dKdUunUYZdHCFJorCwatUyBYs1nmkTV5dJs3ALxWUlvYa6xaqLSsYUJmE6/yr0ALGsl0zWuUzr73wkI2xtJYIixJW8V5dP3q9c3d/SqPpgPASkbjEpzBtf+Mp/9YK47lwb5iwuDIMjB+RMF2BLie/5jP58G0ck1huWyAlWW3JU5h7zUAmCqNW2zIrmJO9GzQuZGSRXxA0qHLDCZWWjm56kWWW4EZ5FEhHT15dNSUTjNPmsEb8uMo7mcWPDIZfKPtc9vfgj2hIJbVw+NXzzJoOJ3REwlX8BIzCsQusA0I2awEL36PDtdfPjxSYCrkJt4XHpRhGwI3XP8NxAAwVqpHLRXbhJMFxEBPLlYQN2zLSS11SjzqSTJdBnfGuNxeQKV/NLe4xmcb+xJJt0w4PGXIbVcAnZaybLVDjzlBjWuPUMMijqewvD136GzjUFtn7O3VqMhOnWvHy3aUmvb7Mf2Xc/Ri7C/EvVcSY5gOAj+SaDHrWpcalRYWayWYxdC2i5JvoRDMGGrmmjfJz4SwiA2o5AZMnankLYgNTe+gEvgchqSQAn45Q/ndJQV5ifrwF6ANv3xqFMV4m9SUNEG7+uSRejHrNEfcvbNUofAhlB/h+l7MI/q5UNGTaP1w93lN61nn64ycpa/F7HiEqP0Lxy6L9Q==

  • Open a toast by clicking on the TOAST button
  • Click on the COPY action button
  • Toast is closed, and I want to update the current toast with another action text and color (code copied).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ToastAction and ToastClose entry points in the Reka UI integration and reproduce the linked example to trace why the action closes the toast. Done means an action can preserve the current toast so its text and color can be updated afterward; the issue indicates that the required change may belong in Reka UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.