Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/543#discussion_r42610774
  
    --- Diff: app/addons/components/react-components.react.jsx ---
    @@ -60,6 +62,101 @@ function (app, FauxtonAPI, React, Stores, 
FauxtonComponents, ace, beautifyHelper
         }
       });
     
    +
    +  var BulkActionComponent = React.createClass({
    +
    +    propTypes: {
    +      hasSelectedItem: React.PropTypes.bool.isRequired,
    +      removeItem: React.PropTypes.func.isRequired,
    +      selectAll: React.PropTypes.func.isRequired,
    +      toggleSelect: React.PropTypes.func.isRequired,
    +      isChecked: React.PropTypes.bool.isRequired
    +    },
    +
    +    getDefaultProps: function () {
    +      return {
    +        disabled: false,
    +        title: 'Select rows that can be...',
    +        bulkIcon: 'fonticon-trash',
    +        buttonTitle: 'Delete all selected',
    +        dropdownContentText: 'Deleted',
    +        enableOverlay: false
    +      };
    +    },
    +
    +    render: function () {
    +      return (
    +        <div className="bulk-action-component">
    +          <div className="bulk-action-component-selector-group">
    +            {this.getMasterSelector()}
    +            {this.getMultiSelectOptions()}
    +          </div>
    +        </div>
    +      );
    +    },
    +
    +    getMultiSelectOptions: function () {
    +      if (!this.props.hasSelectedItem) {
    +        return null;
    +      }
    +
    +      return (
    +        <button
    +          onClick={this.props.removeItem}
    +          className={'fonticon ' + this.props.bulkIcon}
    --- End diff --
    
    hm, we have no rule that we have to use double quotes in a computed 
property. i usually go with single quotes as it is a computed one, and not 
declarative markup


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to