stream-chat-react
stream-chat-react copied to clipboard
Mentions to accept custom component
Motivation
Current implementation of Mention does not allow users to use their own custom component to render in its place and only renders span element without any information for matching users when registering onMentionsClick handler.
Proposed solution
- add
data-user-idattribute to the defaultspanelement - add
Mentionto theComponentContext(and probably only there as prop drilling might be hard to achieve)
Acceptance Criteria
Mention should be by default rendered with data-user-id attribute and if defined in the ComponentContext - with custom component.