We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3af285 commit 23e9f8fCopy full SHA for 23e9f8f
1 file changed
src/components/ChannelList.js
@@ -188,7 +188,22 @@ const ChannelList = withChatContext(
188
this.listenToChanges();
189
}
190
191
- componentDidUpdate() {
+ async componentDidUpdate(prevProps) {
192
+ // do we need deepequal?
193
+ if (!isEqual(prevProps.filters, this.props.filters)) {
194
+ await this.setState({
195
+ error: false,
196
+ channels: Immutable([]),
197
+ channelIds: Immutable([]),
198
+ loadingChannels: true,
199
+ hasNextPage: true,
200
+ refreshing: false,
201
+ offset: 0,
202
+ });
203
+ console.log('tets');
204
+ await this.queryChannels();
205
+ }
206
+
207
this.props.logger('ChannelList component', 'componentDidUpdate', {
208
tags: ['lifecycle', 'channellist'],
209
props: this.props,
0 commit comments