Skip to content

Commit

Permalink
Merge pull request #41 from ParsePlatform/peterjs.explitDisabledCheckbox
Browse files Browse the repository at this point in the history
Add not allowed styles to bulk checkbox.
  • Loading branch information
drew-gross committed Mar 4, 2016
2 parents 1691ddd + 6e55cb4 commit cccac55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ export default class DataBrowserHeaderBar extends React.Component {
render() {
let { headers, onResize, selected, selectAll, onAddColumn, updateOrdering, readonly, handleDragDrop } = this.props;
let elements = [
// Note: bulk checkbox is disabled as all rows are selected (not just visible ones due to current lazy loading implementation)
// TODO: add bulk checking only visible rows
<div key='check' className={[styles.wrap, styles.check].join(' ')}>
{readonly ? null : <input type='checkbox' disabled={true} checked={false} onChange={(e) => selectAll(e.target.checked)} />}
{readonly ? null : <input className={styles.disabled} type='checkbox' disabled={true} checked={false} onChange={(e) => selectAll(e.target.checked)} />}
</div>
];

Expand Down
4 changes: 4 additions & 0 deletions components/DataBrowserHeaderBar/DataBrowserHeaderBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@
margin: 0 -4px;
cursor: ew-resize;
}

.disabled {
cursor: not-allowed;
}

0 comments on commit cccac55

Please sign in to comment.