[@mantine/modals] update modal props #1719
Replies: 6 comments 3 replies
-
|
async confirm is good, possible to impl? |
Beta Was this translation helpful? Give feedback.
-
|
actual, any ideas? how update confirm button props async |
Beta Was this translation helpful? Give feedback.
-
|
Any updates on this for the core? Being able to update the cancel/confirm buttons based on a state (async loading) is a very common use case. |
Beta Was this translation helpful? Give feedback.
-
|
+1 @rtivital |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
https://mantine.dev/x/modals/#dynamic-content-and-the-modals-manager |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Updating the modal state is a relatively common requirement, for example, to perform a delete operation when the confirm button is clicked, the
loadingstate of the confirm button needs to be updated and the closing of the modal should be prevented if an error occurs.Or you can make
onConfirmsupport returnpromise, automatically handle theloadingstate, and prevent the modal from closing if it returnsrejectBeta Was this translation helpful? Give feedback.
All reactions