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
feat: add presentMenu and closeMenu calls for overflowMenuPressHandler (#220)
* chore: update deps
* docs: update manually closing menu
* feat: add `presentMenu` and `closeMenu` calls for overflowMenuPressHandlerDropdownMenu
* chore: update node in CI
Copy file name to clipboardexpand all lines: README.md
+8
Original file line number
Diff line number
Diff line change
@@ -258,6 +258,14 @@ You can fully customize what it renders inside of the `PlatformPressable` using
258
258
259
259
## Recipes
260
260
261
+
#### Closing the overflow menu from `overflowMenuPressHandlerDropdownMenu` manually
262
+
263
+
`overflowMenuPressHandlerDropdownMenu` supports rendering custom items in the menu. In your item's onPress handler, you can call `closeMenu` to close the menu manually.
264
+
265
+
```ts
266
+
const { closeMenu } =useOverflowMenu();
267
+
```
268
+
261
269
#### Customizing the overflow menu
262
270
263
271
The default handler for overflow menu on iOS is `overflowMenuPressHandlerActionSheet`.
0 commit comments