expo / react-native-action-sheet

A cross-platform ActionSheet for React Native
MIT License
1.4k stars 226 forks source link

feat: Add option to always show cancel button #330

Open hmhobbs opened 3 months ago

hmhobbs commented 3 months ago

This adds a boolean option stickyCancel to showActionSheetWithOptions that moves the cancel button outside of the ScrollView in the custom action sheet containing the other options. This emulates the default behavior on iOS. It is especially useful for action sheets with a long list of options. This also adds another button to the example app to demonstrate this behavior.

With stickyCancel: true Screenshot from 2024-07-21 19-32-08

with stickyCancel: false Screenshot from 2024-07-21 19-32-34

hmhobbs commented 3 months ago

This is to address the following issues:

319 #327