You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/action.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,22 @@ data: {
38
38
}
39
39
```
40
40
41
+
### Confirm
42
+
43
+
When specified, a [browser-native confirm dialog](https://developer.mozilla.org/en-US/docs/Web/API/Window/confirm) is shown before the action is actually performed. The action only is performed after the user confirms. The action is not performed if the user declines to confirm dialog.
44
+
45
+
```ruby
46
+
confirm: {
47
+
text:"Do you really want to delete this item?"
48
+
}
49
+
```
50
+
51
+
If no `text` is given, the default text "Are you sure?" will be used.
52
+
53
+
```ruby
54
+
confirm:true
55
+
```
56
+
41
57
### Success
42
58
43
59
The success part of the action component gets triggered once the action we wanted to perform returns a success code, usually the `200` HTTP status code.
0 commit comments