Skip to content

Commit 6656e20

Browse files
AkashDhimangnprice
authored andcommitted
sharing: Make the stream/topic input list scrollable.
Previously the scroll event was getting registered by the ScrollView enclosing these input list, hence users were not able to scroll through the input list provided in the sharing screen. Upstream docs: https://reactnative.dev/docs/scrollview#nestedscrollenabled-android say this defaults to true, which should mean this is redundant. But empirically, we seem to need it. Discussion at: #4514 (comment)
1 parent 1a20529 commit 6656e20

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/autocomplete/StreamAutocomplete.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class StreamAutocomplete extends PureComponent<Props> {
3434
return (
3535
<Popup>
3636
<FlatList
37+
nestedScrollEnabled
3738
keyboardShouldPersistTaps="always"
3839
initialNumToRender={matchingSubscriptions.length}
3940
data={matchingSubscriptions}

src/autocomplete/TopicAutocomplete.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class TopicAutocomplete extends PureComponent<Props> {
6464
<AnimatedScaleComponent visible={topicsToSuggest.length > 0}>
6565
<Popup>
6666
<FlatList
67+
nestedScrollEnabled
6768
keyboardShouldPersistTaps="always"
6869
initialNumToRender={10}
6970
data={topicsToSuggest}

src/sharing/ShareToStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class ShareToStream extends React.Component<Props, State> {
155155

156156
return (
157157
<>
158-
<ScrollView style={styles.wrapper} keyboardShouldPersistTaps="always">
158+
<ScrollView style={styles.wrapper} keyboardShouldPersistTaps="always" nestedScrollEnabled>
159159
<View style={styles.container}>
160160
{sharedData.type === 'image' && (
161161
<Image source={{ uri: sharedData.sharedImageUrl }} style={styles.imagePreview} />

0 commit comments

Comments
 (0)