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
This is useful when you need to dismiss all child sheets and return focus to a parent sheet without closing it.
54
54
55
+
### Dismiss All Sheets
56
+
57
+
To dismiss all sheets in the current stack at once, use the static [`dismissAll()`](/reference/methods#dismissall) method:
58
+
59
+
```tsx
60
+
awaitTrueSheet.dismissAll()
61
+
```
62
+
63
+
:::info Presentation Context
64
+
This only dismisses sheets in the current presentation context. Sheets presented behind a modal (e.g., React Navigation modal or React Native Modal) will not be affected.
65
+
:::
66
+
55
67
## Stack Behavior (Web)
56
68
57
69
On web, you can customize the stacking behavior using the [`stackBehavior`](https://gorhom.dev/react-native-bottom-sheet/modal/props#stackbehavior) prop:
Dismisses all presented sheets in the current stack. This is useful when you need to close all sheets at once, for example when navigating away or resetting the UI state.
110
+
111
+
| Parameters | Required | Default |
112
+
| - | - | - |
113
+
|`animated: boolean`| No |`true`|
114
+
115
+
```tsx
116
+
awaitTrueSheet.dismissAll()
117
+
118
+
// Dismiss all without animation
119
+
awaitTrueSheet.dismissAll(false)
120
+
```
121
+
122
+
:::note
123
+
This only dismisses sheets in the current presentation context. Sheets presented behind a modal (e.g., React Navigation modal or React Native Modal) will not be affected.
0 commit comments