-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Description
Description
When using toaster.promise
and you pass an options object with no loading
config, the app crashes.
In the console we are presented with two errors:
Warning: Each child in a list should have a unique "key" prop.
Check the render method of `Toaster`.
and
Uncaught Error: [zag-js > toast] missing required props: id
When uncommenting the loading
config in App.tsx
the code runs as expected.
The types for the PromiseOptions
mark this as optional, but seems to not be the case, or the code isn't handling it correctly.
This issue is also present in Chakra due to using the underlying Ark implementation.
Link to Reproduction (or Detailed Explanation)
https://codesandbox.io/p/devbox/weathered-currying-8h8yz6
Steps to Reproduce
- Click on "Add Toast" button
- Wait 0.5s for promise to resolve
- Observe the page crash
- Inspect the browser console to see the two errors detailed above
Ark UI Version
5.15.1
Framework
- React
- Solid
- Vue
- Svelte
Browser
Google Chrome
Additional Information
No response
Metadata
Metadata
Assignees
Labels
No labels