From b2d7cf61ccd8582efe276248b66e98a3b5fe4cf8 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Thu, 16 Apr 2020 11:55:18 +0200 Subject: [PATCH] Fixed search results not showing --- src/components/Lists/GroupListAccordion.js | 6 +++++- src/screens/GroupSelectionScreen.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Lists/GroupListAccordion.js b/src/components/Lists/GroupListAccordion.js index dff8890..b4437a5 100644 --- a/src/components/Lists/GroupListAccordion.js +++ b/src/components/Lists/GroupListAccordion.js @@ -49,6 +49,7 @@ class GroupListAccordion extends React.Component { renderItem = ({item}: Object) => { if (stringMatchQuery(item.name, this.props.currentSearchString)) { + const onPress = () => this.props.onGroupPress(item); const onStartPress = () => this.props.onFavoritePress(item); return ( @@ -80,6 +81,9 @@ class GroupListAccordion extends React.Component { render() { const item = this.props.item; + console.log("====================================================="); + console.log(this.props.currentSearchString); + console.log(this.state.expanded); return ( { keyExtractor={this.keyExtractor} listKey={item.id} // Performance props, see https://reactnative.dev/docs/optimizing-flatlist-configuration - getItemLayout={this.itemLayout} + // getItemLayout={this.itemLayout} // Broken with search removeClippedSubviews={true} /> diff --git a/src/screens/GroupSelectionScreen.js b/src/screens/GroupSelectionScreen.js index f080139..22c09c6 100644 --- a/src/screens/GroupSelectionScreen.js +++ b/src/screens/GroupSelectionScreen.js @@ -80,6 +80,7 @@ class GroupSelectionScreen extends React.Component { * @param str The new search string */ onSearchStringChange = (str: string) => { + console.log('search'); this.setState({currentSearchString: str}) };