mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: fix messagepad render, fix #1074
This commit is contained in:
4 files changed
+13
-20
No files matched your search
@@ -23,10 +23,6 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
// eslint-disable-next-line react-refresh/only-export-components
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadDialogueListContainer extends React.PureComponent {
|
||||
componentDidMount() {
|
||||
$(this.refs.list).scrollLock({ strict: true });
|
||||
}
|
||||
|
||||
render() {
|
||||
const orderedDialogues = _.orderBy(
|
||||
_.values(this.props.dialogues),
|
||||
@@ -36,7 +32,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class MessagePadDial
|
||||
'desc',
|
||||
);
|
||||
return (
|
||||
<ol className="messagepad__list" ref="list">
|
||||
<ol className="messagepad__list" ref={(ref) => $(ref).scrollLock({ strict: true })}>
|
||||
{_.map(orderedDialogues, (dialogue) => (
|
||||
<ListItem
|
||||
key={dialogue._id}
|
||||
|
||||
Reference in new issue
Block a user