Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0FE53200D1E for ; Wed, 4 Oct 2017 00:58:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0EA111609DE; Tue, 3 Oct 2017 22:58:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 52F71160BD5 for ; Wed, 4 Oct 2017 00:58:22 +0200 (CEST) Received: (qmail 40321 invoked by uid 500); 3 Oct 2017 22:58:21 -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 40312 invoked by uid 99); 3 Oct 2017 22:58:21 -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; Tue, 03 Oct 2017 22:58:21 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D24D480D54; Tue, 3 Oct 2017 22:58:20 +0000 (UTC) Date: Tue, 03 Oct 2017 22:58:20 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Added custom pasteSelect to handle paste events (#3562) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <150707150072.22782.43116890446802999@gitbox.apache.org> From: maximebeauchemin@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: fdbc936dc9ca9d348b9df8dbf3d08cdf345bd37d X-Git-Newrev: 076f9cd095db95074c09ff630743c1873b15aebc X-Git-Rev: 076f9cd095db95074c09ff630743c1873b15aebc X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Tue, 03 Oct 2017 22:58:23 -0000 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 076f9cd Added custom pasteSelect to handle paste events (#3562) 076f9cd is described below commit 076f9cd095db95074c09ff630743c1873b15aebc Author: Jeff Niu AuthorDate: Tue Oct 3 15:58:18 2017 -0700 Added custom pasteSelect to handle paste events (#3562) --- .../explore/components/controls/SelectControl.jsx | 59 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/superset/assets/javascripts/explore/components/controls/SelectControl.jsx b/superset/assets/javascripts/explore/components/controls/SelectControl.jsx index 4c72b5d..51381d6 100644 --- a/superset/assets/javascripts/explore/components/controls/SelectControl.jsx +++ b/superset/assets/javascripts/explore/components/controls/SelectControl.jsx @@ -37,6 +37,55 @@ const defaultProps = { valueKey: 'value', }; +// Handle `onPaste` so that users may paste in +// options as comma-delimited, slightly modified from +// https://github.com/JedWatson/react-select/issues/1672 +function pasteSelect(props) { + let pasteInput; + return ( + ); + const selectWrap = this.props.freeForm ? ( + + {pasteSelect} + + ) : ( + pasteSelect(selectProps) + ); return (
{this.props.showHeader && -- To stop receiving notification emails like this one, please contact ['"commits@superset.apache.org" '].