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

Mentions to accept custom component

Open MartinCupela opened this issue 3 years ago • 0 comments

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-id attribute to the default span element
  • add Mention to the ComponentContext (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.

MartinCupela avatar Mar 23 '22 16:03 MartinCupela