Closed jasonvarga closed 1 day ago
Everyone look away while I struggle to resolve these conflicts. 🙈
I screwed up the commit history. Oops. But the PR diff is just the modal stuff. Good enough. 🙃
Sorry, I probably should have just done both parts in one branch in the first place! 😅
All good! 😄
Replaces #10833. Rebasing would be a bit of a nightmare after all the changes in #10352.
This adds the ability to add modals to field actions.
For example, take this silly action that opens a modal asking for a character and the number of times to repeat it
If it's dangerous, you can make the confirmation button scary and red by adding
dangerous: true
, and add some redwarningText
.Also, actions can have automatic loading states if you return a promise. Works well if you need to do an ajax request. For example, here's the same silly example, but in a setTimeout so it takes longer.