Skip to content

Commit

Permalink
correct current total
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Sep 8, 2024
1 parent 199a7ac commit 85d6a71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/PerspectiveView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class P extends React.Component {
checkedRow: null,
checkedColumn: null,
checkedAll: null,
entriesTotal: null
entriesTotal: 0
};

this.onCheckRow = this.onCheckRow.bind(this);
Expand All @@ -270,12 +270,12 @@ class P extends React.Component {
//this.reRender = this.reRender.bind(this);
}

componentDidUpdate() {
componentDidUpdate(prevProps) {
const { data } = this.props;
if (!data.perspective) {
return;
}
if (this.state.entriesTotal === null) {
if (data !== prevProps.data) {
this.setState({ entriesTotal: !data.error ? data.perspective.perspective_page.entries_total : 0 });
}
}
Expand Down

0 comments on commit 85d6a71

Please sign in to comment.