stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

feat: Unify pagination logic and make pagination limits configurable

Open MartinCupela opened this issue 2 years ago • 0 comments

Motivation

  • The Chat API does not provide a flag stating, whether there are more messages to be paginated over.
  • There is missing a unified logic in the SDK that would determine, whether there may be more messages to be requested from the API.
  • Pagination limits cannot be configured via props.

Proposed solution Depends on #1635 -> configuration could be done via MessageList component prop and used internally to determine, whether there may be more messages to be paginated over in the database. By putting the config parameter on MessageList different values can be set for main message list and thread.

It is still to be determined, whether the logic should be kept in the API client or in the React SDK.

Acceptance Criteria

  1. SDK user can customize the limits for a page size via MessageList prop
  2. The maximum (100) limits are handled

MartinCupela avatar Jun 16 '22 21:06 MartinCupela