Skip to content

Commit

Permalink
Merges develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaglumac committed Nov 25, 2020
2 parents 996e7ac + 5928209 commit 786f8e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Changelog

### Fixes

- Fixed visual glitch on the transaction list switching between filters ([PR 2249](https://github.com/input-output-hk/daedalus/pull/2249))
- Fixed Newsfeed drop shadow when there is an update item ([PR 2242](https://github.com/input-output-hk/daedalus/pull/2242))

### Chores
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ export class VirtualTransactionList extends Component<Props> {
}

componentDidUpdate(prevProps: Props) {
// Recompute all row heights in case the number of rows has changed
const prevNumberOfRows = prevProps.rows.length;
const nextNumberOfRows = this.props.rows.length;
if (prevNumberOfRows && prevNumberOfRows !== nextNumberOfRows) {
this.rowHeights = this.estimateRowHeights(this.props.rows);
if (this.props.rows.length !== prevProps.rows.length) {
this.recomputeVirtualRowHeights();
}
}
Expand Down Expand Up @@ -302,6 +298,11 @@ export class VirtualTransactionList extends Component<Props> {
// Prevent List rendering if we have no rows to render
if (!rows.length) return false;

// Recompute all row heights in case the number of rows has changed
if (this.rowHeights.length !== rows.length) {
this.rowHeights = this.estimateRowHeights(rows);
}

const componentStyles = classNames([
styles.component,
isLoadingSpinnerShown ? styles.withLoadingSpinner : null,
Expand Down

0 comments on commit 786f8e9

Please sign in to comment.