From commits-return-2211-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Feb 1 06:03:07 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3006B180627 for ; Fri, 1 Feb 2019 07:03:07 +0100 (CET) Received: (qmail 20563 invoked by uid 500); 1 Feb 2019 06:03:06 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 20554 invoked by uid 99); 1 Feb 2019 06:03:06 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2019 06:03:06 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8A1268577C; Fri, 1 Feb 2019 06:03:05 +0000 (UTC) Date: Fri, 01 Feb 2019 06:03:05 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Fix playslider MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <154900098514.25080.8139962797194244470@gitbox.apache.org> From: christine@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: adc9a6b495d42c0e1d35dff5d79ef5534b77a320 X-Git-Newrev: a09348d0ec27463a394d9914dcd5cbfd5670a5ee X-Git-Rev: a09348d0ec27463a394d9914dcd5cbfd5670a5ee X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. christine 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 a09348d Fix playslider new 5669a82 Merge pull request #6797 from lyft/VIZ-187 a09348d is described below commit a09348d0ec27463a394d9914dcd5cbfd5670a5ee Author: Beto Dealmeida AuthorDate: Thu Jan 31 17:23:59 2019 -0800 Fix playslider --- .../src/visualizations/deckgl/CategoricalDeckGLContainer.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/superset/assets/src/visualizations/deckgl/CategoricalDeckGLContainer.jsx b/superset/assets/src/visualizations/deckgl/CategoricalDeckGLContainer.jsx index be30aad..e1933a4 100644 --- a/superset/assets/src/visualizations/deckgl/CategoricalDeckGLContainer.jsx +++ b/superset/assets/src/visualizations/deckgl/CategoricalDeckGLContainer.jsx @@ -70,7 +70,7 @@ export default class CategoricalDeckGLContainer extends React.PureComponent { */ constructor(props) { super(props); - this.state = this.getInitialStateFromProps(props); + this.state = this.getStateFromProps(props); this.getLayers = this.getLayers.bind(this); this.onValuesChange = this.onValuesChange.bind(this); @@ -78,6 +78,11 @@ export default class CategoricalDeckGLContainer extends React.PureComponent { this.toggleCategory = this.toggleCategory.bind(this); this.showSingleCategory = this.showSingleCategory.bind(this); } + componentWillReceiveProps(nextProps) { + if (nextProps.payload.form_data !== this.state.formData) { + this.setState({ ...this.getStateFromProps(nextProps) }); + } + } onValuesChange(values) { this.setState({ values: Array.isArray(values) @@ -88,7 +93,7 @@ export default class CategoricalDeckGLContainer extends React.PureComponent { onViewportChange(viewport) { this.setState({ viewport }); } - getInitialStateFromProps(props, state) { + getStateFromProps(props, state) { const features = props.payload.data.features || []; const timestamps = features.map(f => f.__timestamp); const categories = getCategories(props.formData, features);