title: How can I prevent a row click when I click a React component link within that row?
body: <p>I have a grid, and I would like to have the ability to click the row to enter into a "detail" view, while also having shortcut links to click that do not trigger the "detail" view. Here is my code (some code removed for brevity):</p>
  
  <pre><code>var ActionsColumn = React.createClass({
  
      onClickEdit: function(e) {
          e.preventDefault();
      },
  
      approveUser: function(organizationUserID) {
          OrganizationActions.approveUser(organizationUserID);
      },
  
      render: function () {
          var organizationUserID = this.props.rowData._id;
  
          return (
              &lt;span className='hover-actions'&gt;
                  &lt;a onClick={this.onClickEdit} className={(this.props.rowData.is_pending_approval) ? 'disabled' : ''}&gt;edit&lt;/a&gt;| 
                  {(this.props.rowData.is_pending_approval) 
                      ? &lt;a onClick={this.approveUser.bind(this, organizationUserID)}&gt;approve&lt;/a&gt;
                      : (this.props.rowData.is_suspended)
                      ? &lt;a onClick={this.activateUser.bind(this, organizationUserID)}&gt;activate&lt;/a&gt;
                      : &lt;a onClick={this.suspendUser.bind(this, organizationUserID)}&gt;suspend&lt;/a&gt;
                  }|
                  &lt;a onClick={this.deleteUser.bind(this, organizationUserID)}&gt;&lt;i className='fa fa-trash' /&gt;&lt;/a&gt;
              &lt;/span&gt;
          );
      }
  });
  </code></pre>
  
  <p>The problem is that the above code is outside of the users grid class, so I'm not sure how easy it is to implement a boolean to prevent the row click from going through.</p>
  
  <pre><code>var Users = React.createClass({
  
      mixins: [Reflux.connect(OrganizationStore)],
  
      columns: ['full_name', 'email', 'is_pending_approval', 'role_name', 'actionsColumn'],
  
      columnMetaData: [
          {
              'columnName': "full_name",
              'displayName': "Name",
              'order': 1,
              'visible': true
          },
          {
              'columnName': "email",
              'displayName': "Email",
              'order': 2,
              'visible': true,
              'cssClassName': 'email-column'
          },
          {
              'columnName': "is_pending_approval",
              'displayName': "Status",
              'order': 3,
              'visible': true,
              'customComponent': StatusColumn     
          },
          {
              'columnName': "role_name",
              'displayName': "Role",
              'order': 4,
              'visible': true,
              'cssClassName': 'role-column'
          },
          {
              'columnName': 'actionsColumn',
              'displayName': '',
              'order': 5,
              'customComponent': ActionsColumn,
              'visible': true,
              'cssClassName': 'actions-column'
          }
      ],
  
      onRowClick: function (e) {
  
          var user = e.props.data;
  
          // Cannot click a user that is pending approval.
          if (user.is_pending_approval) {
              return;
          } 
  
          this.setState({detailedUser: user});
      },
  
      render: function () {
  
          var organization = this.props.organization;
  
          return(
              &lt;section className='organization-users-view'&gt;
                  &lt;div className='list-header'&gt;
                      &lt;div className='menu-bar'&gt;
                          &lt;a onClick={this.onAllUsersDropdownClick}&gt;
                              All Users&lt;i className="fa fa-caret-down" /&gt;
                          &lt;/a&gt;
                          &lt;button className='btn btn-primary btn-xs menu-button' onClick={this.addNewUser}&gt;&lt;i className="fa fa-user-plus" /&gt;Invite User&lt;/button&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  {(this.state.detailedUser) 
                      ?
                          &lt;UserView organization={organization} user={this.state.detailedUser} returnToList={this.returnToList} setUser={this.setUser}/&gt;
                      :
                          &lt;Griddle
                              results={organization.users}
                              columnMetadata={this.columnMetaData}
                              columns={this.columns}
                              resultsPerPage={10}
                              useGriddleStyles={false} 
                              noDataMessage={"This organization currently has no users."}
                              tableClassName={"table table-hover table-responsive"}
                              gridClassName={"grid-container"}
                              onRowClick={this.onRowClick} /&gt; 
                  }
              &lt;/section&gt;
          );
      }
  });
  </code></pre>
  
  <p>The problem - although clicking the "approve" link successfully sends off the api call to approve the user, it also triggers the "onRowClick" function, and then the user is in "detailed user" view, which I don't want to happen.</p>
  
  <p>Any thoughts?</p>