0
0
Fork 0

feat: Use CSS contain to avoid computations (#3158)

This commit is contained in:
Sorin Davidoi 2017-05-20 01:26:46 +02:00 committed by Eugen Rochko
parent 8c5eaf7ae9
commit b369fc2de4
2 changed files with 8 additions and 1 deletions

View file

@ -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 />