[iOS] use display: 'none' to hide elements (#2128)
* [iOS] use display: 'none' to hide elements No, it still doesn't work properly on some Android devices, sigh.
This commit is contained in:
parent
4943eabd1b
commit
922bbb1798
|
@ -39,18 +39,16 @@ export default class Container extends AbstractContainer {
|
||||||
|
|
||||||
// visible
|
// visible
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
// FIXME: Whatever I try ends up failing somehow on Android, give up
|
// FIXME: It turns out that display: none will fail on some Android
|
||||||
// for now, hoping display: 'none' solves this.
|
// devices, but work on the others (currently fails on Google Pixel)
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Intentionally hide this Container without destroying it.
|
// Intentionally hide this Container without destroying it.
|
||||||
// TODO Replace with display: 'none' supported in RN >= 0.43.
|
|
||||||
props.style = {
|
props.style = {
|
||||||
...props.style,
|
...props.style,
|
||||||
height: 0,
|
display: 'none'
|
||||||
width: 0
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue