Skip to content

Commit

Permalink
select media by clicking row
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart committed Oct 20, 2017
1 parent fb6e36d commit 44a38b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/MediaLibrary/MediaLibraryTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class MediaLibraryTable extends React.Component {
} = this.props;

return (
<Table onRowSelect={idx => onRowSelect(data[idx])}>
<Table>
<TableHead>
<TableCell { ...this.getHeadCellProps('image', { sort: false, style: { width: '92px' } }) }>
Image
Expand All @@ -53,6 +53,12 @@ export default class MediaLibraryTable extends React.Component {
selected={selectedFile.id === file.id }
onFocus={onRowFocus}
onBlur={onRowBlur}
onSelect={() => onRowSelect(data[idx])}
onClick={e => {
e.preventDefault();
e.stopPropagation();
onRowSelect(data[idx]);
}}
>
<TableCell>
{
Expand Down

0 comments on commit 44a38b4

Please sign in to comment.