stream-chat-react-native
stream-chat-react-native copied to clipboard
ChannelList Component Pagination does not work as expected
Describe the bug In ChannelList Component Total number of channels returned is different for different limit values set in options object.
Dev environment info (please complete/provide the following information):
-
Package versions "stream-chat": "^6.7.3", "stream-chat-expo": "^4.11.0",
-
react-native or expo version "expo": "^45.0.5", "react-native": "0.68.2",
-
Device/Emulator (android/ios) and OS version Android
To Reproduce Steps to reproduce the behavior:
const filters = {
members: { $in: ['production-test-user-418-ef2bbc9f-2186-424a-9c66-54b482931ecf'] },
type: 'messaging',
}
const sort = { last_message_at: -1 }
const options = {
limit : 10,
state: true,
watch: true,
}
<ChannelList
filters={filters}
options={options}
sort={sort}
/>
Use these values. Total channels listed is not cosistent for different values for limit. e.g. if limit is kept 30, total channels returned are 23 and listed. if limit is kept as 10, total channels returned in second page are 9 and pagination sotps. so only 19 channels are listed.
Expected behavior Total number of channels returen after pagination should be same regarless of limit value
Additional context Problem might be for some users only.