[MM-22872] fix(messaging): DM list not scrolling when you press the up/down arrow keys (#29565)

* Set 'forwardRef' to 'true'

The Redux wrapper component not forwarding the ref to the parent resulted in the selected item ref being null.

* Add DM list test case

This test ensures the DM list scrolls items out of view into view when a user navigates using the Up and Down arrow keys.

* test(dm list): add zephyr test case number

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Vicktor
2025-02-19 23:42:31 +03:00
коммит произвёл GitHub
родитель 2f8c65a1ea
Коммит 4aa4f6f703
2 изменённых файлов: 44 добавлений и 1 удалений

Просмотреть файл

@@ -15,4 +15,4 @@ function mapStateToProps(state: GlobalState) {
};
}
export default connect(mapStateToProps)(ListItem);
export default connect(mapStateToProps, null, null, {forwardRef: true})(ListItem);