Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 52B3317508 for ; Thu, 16 Apr 2015 17:45:40 +0000 (UTC) Received: (qmail 1166 invoked by uid 500); 16 Apr 2015 17:45:39 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 1112 invoked by uid 500); 16 Apr 2015 17:45:39 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 1096 invoked by uid 99); 16 Apr 2015 17:45:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2015 17:45:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 53F51E10AC; Thu, 16 Apr 2015 17:45:39 +0000 (UTC) From: sebastianrothbucher To: dev@couchdb.apache.org Reply-To: dev@couchdb.apache.org References: In-Reply-To: Subject: [GitHub] couchdb-fauxton pull request: Databases view in react Content-Type: text/plain Message-Id: <20150416174539.53F51E10AC@git1-us-west.apache.org> Date: Thu, 16 Apr 2015 17:45:39 +0000 (UTC) Github user sebastianrothbucher commented on a diff in the pull request: https://github.com/apache/couchdb-fauxton/pull/370#discussion_r28532530 --- Diff: app/addons/fauxton/components.react.jsx --- @@ -84,9 +84,129 @@ function (app, FauxtonAPI, React, ZeroClipboard) { }); + var Tray = React.createClass({ + + getInitialState: function () { + return { + show: false + }; + }, + + toggle: function (done) { + if (this.state.show) { + this.hide(done); + } else { + this.show(done); + } + }, + + componentDidMount: function () { + $('body').on('click.Tray-' + this.props.trayid + "-" + this._rootNodeID, function (e) { --- End diff -- I found a better solution for that one - thanks! BTW: while testing I realized that TestUtils.renderIntoDocument drops our container. So we can get more stable results by just using React.renderComponent --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---