signavio / react-mentions

@mention people in a textarea
https://react-mentions.vercel.app
Other
2.42k stars 566 forks source link

fix: fix scroll into view automatically #654

Closed owlran closed 1 year ago

owlran commented 1 year ago

Fixes #663

What did you change (functionally and technically)? It was found that this problem occurred when the suggestionOverlay was refactored into a hook. see this commit Originally, the scroll position would be updated in componentDidUpdate, but in the hook version, it only does this in the initial effect.

so I fix effect's dependency to ensure scroll can be updated in correct time.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 690a90138ede19ea1f6e1774809673bbb63401e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | react-mentions | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-mentions ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 17, 2023 at 2:39AM (UTC)
owlran commented 1 year ago

hi @atilafassina, could you please review this pr 🙏

lagroms commented 1 year ago

I've added the dependencies in my fork as well and it's working fine, except when using customSuggestionsContainer which breaks