React-native-paper: Flex doesn't work on Button

Created on 15 Jun 2019  路  4Comments  路  Source: callstack/react-native-paper

Environment


Expo 33 & react-native-paper 2.16.0.

Description

Applying {flex: 1} to the Button only applies to the Surface container, with no clear ability to properly stretch the TouchableRipple to fit.

As a result, the outline of the button fills the space, but the actual touchable portion does not.

Reproducible Demo

Stale

Most helpful comment

@notjulian @cpboyd There is no need to set flex: 1 in a button. Just wrap it with an View. Check this Snack .

All 4 comments

example choose Button on the list
works with API 28 not with API 26

<View style={{flex: 1, flexDirection: 'row', justifyContent: 'space-between', marginTop: 10}}>
<Button>{strings.forgottenPassword}</Button>
<Button>{strings.register}</Button>
</View>

photo5830024479613497946

Hello 馃憢, this issue has been open for more than 2 months with no activity on it. If the issue is still present in the latest version, please leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution on workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix the issue.

same behavior with latest version

@notjulian @cpboyd There is no need to set flex: 1 in a button. Just wrap it with an View. Check this Snack .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tonyxiao picture tonyxiao  路  3Comments

ZhengYuTay picture ZhengYuTay  路  3Comments

ButuzGOL picture ButuzGOL  路  3Comments

zxccvvv picture zxccvvv  路  4Comments

ButuzGOL picture ButuzGOL  路  4Comments