You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2019/07/16 16:25:52 UTC
[incubator-superset] branch master updated: fix: add check to
re-render only if underlying layers change (#7878)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new a27b8b7 fix: add check to re-render only if underlying layers change (#7878)
a27b8b7 is described below
commit a27b8b763876ff73d5d6388379ce9312bf09f915
Author: Tom Hunter <th...@users.noreply.github.com>
AuthorDate: Tue Jul 16 12:25:36 2019 -0400
fix: add check to re-render only if underlying layers change (#7878)
---
superset/assets/src/visualizations/deckgl/Multi/Multi.jsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset/assets/src/visualizations/deckgl/Multi/Multi.jsx b/superset/assets/src/visualizations/deckgl/Multi/Multi.jsx
index b511eaa..095ea8b 100644
--- a/superset/assets/src/visualizations/deckgl/Multi/Multi.jsx
+++ b/superset/assets/src/visualizations/deckgl/Multi/Multi.jsx
@@ -17,6 +17,7 @@
* under the License.
*/
import React from 'react';
+import _ from 'lodash';
import PropTypes from 'prop-types';
import { SupersetClient } from '@superset-ui/connection';
@@ -53,7 +54,10 @@ class DeckMulti extends React.PureComponent {
componentWillReceiveProps(nextProps) {
const { formData, payload } = nextProps;
- this.loadLayers(formData, payload);
+ const hasChanges = !_.isEqual(this.props.formData.deck_slices, nextProps.formData.deck_slices);
+ if (hasChanges) {
+ this.loadLayers(formData, payload);
+ }
}
onViewportChange(viewport) {