Changing filters for GroupChannelList doesn't update the list

[Problem/Question]
List of chats is not being updated when channelListQueryParams are changing. I’m using following query params:

const channelListQueryParams: ChannelListQueryParamsType = {
order: GroupChannelListOrder.LATEST_LAST_MESSAGE,
hiddenChannelFilter: ‘hidden_only’ / ‘unhidden_only’,
limit: 100,
};

And like you can see I’m switching hiddenChannelFilter between hidden and unhidden. However this doesn’t update chats list at all. This is how I’m using it:

<GroupChannelListFragment
onPressCreateChannel={navigateToGroupChannelCreateScreen}
onPressChannel={navigateToGroupChannelScreen}
// Render custom channel preview
renderGroupChannelPreview={(props) => {
return <CustomChannelPreview {…props} />;
}}
// Apply query parameters for channel list
channelListQueryParams={channelListQueryParams}
/>

It’s working on Chat SDK 4.12.10 but from version 4.13.0 it’s not working anymore, I’ve tried version up to 4.15.0.

[UIKit Version]
@sendbird/chat”: “4.13.0”,+
@sendbird/uikit-react-native”: “3.7.6”,

[Reproduction Steps]

  1. Create GroupChannelList with import { createGroupChannelListFragment } from ‘@sendbird/uikit-react-native’;
  2. Create channelListQueryParams like in example with possibility to change hiddenChannelFilter
  3. Change hiddenChannelFilter. List is not being updated.

[Frequency]
Every time

[Current impact]
Feature doesn’t works.

I’m facing the same issue, every time I change the filter, the list of chats does not re-render. Can somebody please suggest some workaround?

Any updates about it?

Hi @matbiz & @imal,

Welcome to the Sendbird Community

Could you please try the following code and see if you are still facing any issues?

const loadChannels = async (channelHandlers) => {
    const groupChannelFilter = new GroupChannelFilter();
    groupChannelFilter.includeEmpty = true;
    groupChannelFilter.hiddenChannelFilter = HiddenChannelFilter.HIDDEN;

    const collection = sb.groupChannel.createGroupChannelCollection({
        filter: groupChannelFilter,
        order: GroupChannelListOrder.LATEST_LAST_MESSAGE,
    });

    collection.setGroupChannelCollectionHandler(channelHandlers);

    const channels = await collection.loadMore();
    return [channels, null];
}

Reference: HiddenChannelFilter | Sendbird Chat SDK Reference - v4.16.0

Sure I can but where I should use this function? I want to use your component to show chat list and change filters. Like I mentioned changing filters was working in version 4.12.10 and after upgrade to 4.13.0 it’s not working anymore.

So I checked newest version of js sdk (4.16.1) with latest version of react native ui kit (3.8.2). Changing filters works partially, if I want show only hidden channels with HiddenChannelFilter.HIDDEN it shows empty list when on previous versions (js sdk: 4.12.10 and react native ui kit 3.7.0) it shows hidden channels.

@Suhirtha_Ayyappan I checked this again on js sdk (4.16.4) with latest version of react native ui kit (3.8.4) and there is still problem with showing hidden chats. When this problem will be resolved?