diff --git a/src/widgets/CountryTable.js b/src/widgets/CountryTable.js index b1df7db..2a18dad 100644 --- a/src/widgets/CountryTable.js +++ b/src/widgets/CountryTable.js @@ -27,7 +27,6 @@ export default class Template extends Component { constructor(props) { super(props); - this.state = {}; } componentDidMount() { @@ -63,6 +62,17 @@ export default class Template extends Component { }); } + shouldComponentUpdate(nextProps) { + const { props } = this; + + return Object.keys(this.props).reduce((acc, key) => { + if (props[key] !== nextProps[key]) { + return acc && false; + } + return acc; + }, true); + } + render() { if (this.viz != null) { this.viz.show(this.ref);