Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionSheet on Android exceeds height of screen on long list of items #1595

Closed
a0js opened this issue Feb 16, 2018 · 1 comment
Closed

ActionSheet on Android exceeds height of screen on long list of items #1595

a0js opened this issue Feb 16, 2018 · 1 comment

Comments

@a0js
Copy link

a0js commented Feb 16, 2018

react-native, react and native-base version

  • react-native: 0.52.2
  • react: 16.2.0
  • native-base: 2.3.7

Expected behaviour

When using ActionSheet in Android with a long list of items, the list should be scrollable and bounds of the modal should remain confined within the root container.

Actual behaviour

The modal height exceeds the height of the container enough that the top of the title is clipped by the top of the content container.

Steps to reproduce (code snippet or screenshot)

<Button transparent onPress={() => ActionSheet.show(
	{
	   options: collections.map(collection => { return collection.title; }), // Has 12+ entries
	   cancelButtonIndex: 0,
	   title: 'Select Collection'
	},
	buttonIndex => {
		this.changeCollection(collections[buttonIndex]);
	}
)}>
</Button>

Screenshot of emulator/device

screen shot 2018-02-15 at 5 45 38 pm

It may appear that the status bar is covering the top, but in reality the container is trimmed to the bottom of the spacebar, otherwise the top of the 'S' and 'C' would be visible under the status bar that has an alpha value on the color.

Is the bug present in both ios and android or in any one of them?

Android only, ios uses the built in ios actionsheet.

Any other additional info which would help us debug the issue quicker.

I already found a solution. Adding maxHeight: '100%' to the TouchableOpacity view will give the expected behavior. I will open a pull request to fix the issue.

@SupriyaKalghatgi
Copy link
Contributor

Fixed with 2.3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants