add max-height and overflow-y: auto to suggestions list
use @ to call suggestion list
If you continue to use arrow down to move further down, you will see the focused item gradually moving down, but it won't automatically scroll to the focused item.
Expected behaviour:
To automatically scroll to the position of the focused item.
Observed behaviour:
Currently, there is no automatic scrolling down to the focused item.
Workaround:
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.
work fine in the version of react-mentions at 4.4.6. -> codesandbox
This version is prior to the suggesionsOverlay refactor react hook, which causes the suggestion list to not scroll automatically when using the up and down arrow keys to scroll.
Steps to reproduce:
max-height
andoverflow-y: auto
to suggestions listExpected behaviour: To automatically scroll to the position of the focused item.
Observed behaviour: Currently, there is no automatic scrolling down to the focused item.
codesandbox
Workaround: 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.
work fine in the version of react-mentions at 4.4.6. -> codesandbox This version is prior to the suggesionsOverlay refactor react hook, which causes the suggestion list to not scroll automatically when using the up and down arrow keys to scroll.