From 4ba7d50e6b91dee11757242d792a933326685a5a Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Fri, 26 Mar 2021 14:55:37 +0800 Subject: [PATCH 1/4] temporary fix (should opt for something less janky) --- src/components/OptionsList.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/OptionsList.js b/src/components/OptionsList.js index 5add5fa4c95a..131ed9b12c10 100644 --- a/src/components/OptionsList.js +++ b/src/components/OptionsList.js @@ -190,7 +190,9 @@ class OptionsList extends Component { render() { return ( - + + // need to set a height (0 works in this case) so that the view will scroll on mobile + {this.props.headerMessage ? ( From e8ebae652b0a073d0b26380fc69bfdbed503e2d9 Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Fri, 26 Mar 2021 15:14:06 +0800 Subject: [PATCH 2/4] Found better solution --- src/components/OptionsList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/OptionsList.js b/src/components/OptionsList.js index 131ed9b12c10..8ba0346b8476 100644 --- a/src/components/OptionsList.js +++ b/src/components/OptionsList.js @@ -191,8 +191,7 @@ class OptionsList extends Component { render() { return ( - // need to set a height (0 works in this case) so that the view will scroll on mobile - + {this.props.headerMessage ? ( @@ -214,6 +213,7 @@ class OptionsList extends Component { renderItem={this.renderItem} renderSectionHeader={this.renderSectionHeader} extraData={this.props.focusedIndex} + style={[styles.flex1]} /> ); From 670e2a1a1d37195eea805af4481ddababc0ffb9d Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Fri, 26 Mar 2021 15:18:19 +0800 Subject: [PATCH 3/4] Revert "Found better solution" This reverts commit e8ebae652b0a073d0b26380fc69bfdbed503e2d9. --- src/components/OptionsList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/OptionsList.js b/src/components/OptionsList.js index 8ba0346b8476..131ed9b12c10 100644 --- a/src/components/OptionsList.js +++ b/src/components/OptionsList.js @@ -191,7 +191,8 @@ class OptionsList extends Component { render() { return ( - + // need to set a height (0 works in this case) so that the view will scroll on mobile + {this.props.headerMessage ? ( @@ -213,7 +214,6 @@ class OptionsList extends Component { renderItem={this.renderItem} renderSectionHeader={this.renderSectionHeader} extraData={this.props.focusedIndex} - style={[styles.flex1]} /> ); From 076c5a05b5d54500d503b524df41e7560faeb247 Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Fri, 26 Mar 2021 15:48:23 +0800 Subject: [PATCH 4/4] Update comment --- src/components/OptionsList.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/OptionsList.js b/src/components/OptionsList.js index 131ed9b12c10..62b19b6f786b 100644 --- a/src/components/OptionsList.js +++ b/src/components/OptionsList.js @@ -192,6 +192,7 @@ class OptionsList extends Component { return ( // need to set a height (0 works in this case) so that the view will scroll on mobile + // NOTE: the view will still fill its container since it has flex: 1 on it {this.props.headerMessage ? (