import React, {PropTypes} from 'react';

const BranchesListRow = ({repoId, branch, onSelect}) => {
  return (
    <button type="button" className="list-group-item" data-repo-id={repoId} onClick={onSelect}>{branch.name}</button>
  );
};

BranchesListRow.propTypes = {
  repoId: PropTypes.number.isRequired,
  branch: PropTypes.object.isRequired,
  onSelect: PropTypes.func.isRequired
};

export default BranchesListRow;

import React, {PropTypes} from 'react';

const BranchesListRow = ({repoId, branch, onSelect}) => {
  return (
    <button type="button" className="list-group-item" data-repo-id={repoId} value={branch.name} onClick={onSelect}>{branch.name}</button>
  );
};

BranchesListRow.propTypes = {
  repoId: PropTypes.number.isRequired,
  branch: PropTypes.object.isRequired,
  onSelect: PropTypes.func.isRequired
};

export default BranchesListRow;

Add 'value' attribute set to 'branch.name' on button element
Add 'value' attribute set to 'branch.name' on button element
