-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to disable buttons in action sheet ios (#28979)
Summary: _**Fixed**_ version of [the previous PR](#28792) after reverting [changes](c8d678a#commitcomment-39299254) ---- I've noticed that currently there is no option to disable button within the `ActionSheetIOS`. It can be really useful and decided to extend the API to support that functionality. I added a new option called `disabledButtonsIndices` to `ActionSheetIOS` which is an array of button indices which should be disabled. `ActionSheetIOS` documentation - PR facebook/react-native-website#1898 ## Changelog [iOS] [Added] - Add disableButtonsIndices option to ActionSheetIOS component Pull Request resolved: #28979 Test Plan: 1. Run the `RNTester` 2. Choose `ActionSheetIOS` 3. Check the fourth example `Show Action Sheet with disabled buttons` 4. `Option 1` and `Option 2` should be disabled screenshot | gif --- | --- <img width="493" alt="Screenshot 2020-04-30 at 15 16 22" src="https://user-images.githubusercontent.com/22746080/80739025-1ec52780-8b16-11ea-8b1c-30bb40ad8c99.png"> | <img src="https://user-images.githubusercontent.com/22746080/80739043-24227200-8b16-11ea-8bcb-af25eb57baac.gif" width="493" /> Reviewed By: sammy-SC Differential Revision: D21727497 Pulled By: PeteTheHeat fbshipit-source-id: 749b6c623eb8a44fe2bd96829ce89be5310e2368
- Loading branch information
1 parent
130618f
commit a7c1c5a
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters