prevent user from toggling files when commit is in progress

This commit is contained in:
Sungwon Ma 2018-08-03 15:37:25 -04:00
parent 13b21a8984
commit 9cea8a04de
2 changed files with 4 additions and 1 deletions

View file

@ -12,6 +12,7 @@ interface IChangedFileProps {
readonly oldPath?: string
readonly include: boolean | null
readonly availableWidth: number
readonly disabled: boolean
readonly onIncludeChanged: (path: string, include: boolean) => void
/** Callback called when user right-clicks on an item */
@ -65,6 +66,7 @@ export class ChangedFile extends React.Component<IChangedFileProps, {}> {
tabIndex={-1}
value={this.checkboxValue}
onChange={this.handleCheckboxChange}
disabled={this.props.disabled}
/>
<PathLabel

View file

@ -176,6 +176,7 @@ export class ChangesList extends React.Component<
onContextMenu={this.onItemContextMenu}
onIncludeChanged={this.props.onIncludeChanged}
availableWidth={this.props.availableWidth}
disabled={this.props.isCommitting}
/>
)
}
@ -376,7 +377,7 @@ export class ChangesList extends React.Component<
label={filesDescription}
value={this.includeAllValue}
onChange={this.onIncludeAllChanged}
disabled={fileCount === 0}
disabled={fileCount === 0 || this.props.isCommitting}
/>
</div>