feat: Use CSS contain to avoid computations (#3158)
This commit is contained in:
committed by
Eugen Rochko
parent
8c5eaf7ae9
commit
b369fc2de4
@ -100,7 +100,9 @@ class Notifications extends React.PureComponent {
|
||||
unread = <div className='notifications__unread-indicator' />;
|
||||
}
|
||||
|
||||
if (isLoading || notifications.size > 0) {
|
||||
if (isLoading && this.scrollableArea) {
|
||||
scrollableArea = this.scrollableArea;
|
||||
} else if (notifications.size > 0) {
|
||||
scrollableArea = (
|
||||
<div className='scrollable' onScroll={this.handleScroll} ref={this.setRef}>
|
||||
{unread}
|
||||
@ -119,6 +121,8 @@ class Notifications extends React.PureComponent {
|
||||
);
|
||||
}
|
||||
|
||||
this.scrollableArea = scrollableArea;
|
||||
|
||||
return (
|
||||
<Column icon='bell' active={isUnread} heading={intl.formatMessage(messages.title)}>
|
||||
<ColumnSettingsContainer />
|
||||
|
Reference in New Issue
Block a user