react-native-controlled-mentions icon indicating copy to clipboard operation
react-native-controlled-mentions copied to clipboard

Providing a context provider

Open matinzd opened this issue 3 years ago • 7 comments

I think it can be a good idea to provide a context provider in order to move suggestion rendering out of the container itself. Imagine you are having a comment input and a send button next to it. For example:

Screenshot 2022-09-02 at 15 28 00

matinzd avatar Sep 02 '22 13:09 matinzd

why not use scrollView?

fukemy avatar Sep 19 '22 06:09 fukemy

why not use scrollView?

What do you mean?

matinzd avatar Sep 19 '22 07:09 matinzd

i think better is keep rendering view inside mentionView better(avoid memories, better handling). And you can wrap the mentionView by scrollView + give maxheight to it.

But for your issues, you can refer to v3 alpha then look how it work

fukemy avatar Sep 19 '22 08:09 fukemy

i think better is keep rendering view inside mentionView better(avoid memories, better handling). And you can wrap the mentionView by scrollView + give maxheight to it.

But for your issues, you can refer to v3 alpha then look how it work

I mean we can move rendering the whole list out of component and have some kind of context to get the render suggestions. I may send a PR for my proposal.

matinzd avatar Sep 19 '22 08:09 matinzd

Please double check the v3-alpha, he did all your purpose.

  1. No need to use MentionInput directly
  2. Keep track to mentions suggest
  3. Render mention view in every place you want

fukemy avatar Sep 19 '22 10:09 fukemy

https://github.com/dabakovich/react-native-controlled-mentions/issues/75#issuecomment-1114282123

fukemy avatar Sep 19 '22 10:09 fukemy

#75 (comment)

Nice! I didn’t see that. That is what I wanted :)

matinzd avatar Sep 19 '22 11:09 matinzd

Closing the issue as it seems that v3 resolves the issues described here.

dabakovich avatar Sep 16 '23 10:09 dabakovich