Skip to content

Commit

Permalink
Fix issue with TabPage transition delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanshar committed May 4, 2020
1 parent 27329c2 commit 793d785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/tabController/TabPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ export default class TabPage extends PureComponent {
};

renderCodeBlock = () => {
const {currentPage} = this.context;
const {targetPage} = this.context;
const {index, lazy} = this.props;
return block([
cond(and(eq(currentPage, index), lazy, eq(this._loaded, 0)), [set(this._loaded, 1), call([], this.lazyLoad)]),
cond(eq(currentPage, index),
cond(and(eq(targetPage, index), lazy, eq(this._loaded, 0)), [set(this._loaded, 1), call([], this.lazyLoad)]),
cond(eq(targetPage, index),
[set(this._opacity, 1), set(this._zIndex, 1)],
[set(this._opacity, 0), set(this._zIndex, 0)])
]);
Expand Down

0 comments on commit 793d785

Please sign in to comment.