[FIX] Disable reset button if form didn't changed (#1569)

Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
devyaniChoubey 2020-01-28 18:56:46 +05:30 committed by Diego Mello
parent 3a9ba9c681
commit 8ff6a3a27e
1 changed files with 3 additions and 1 deletions

View File

@ -425,9 +425,11 @@ class RoomInfoEditView extends React.Component {
style={[
styles.buttonContainer_inverted,
styles.buttonInverted,
{ flex: 1, borderColor: themes[theme].auxiliaryText }
{ flex: 1, borderColor: themes[theme].auxiliaryText },
!this.formIsChanged() && styles.buttonContainerDisabled
]}
onPress={this.reset}
disabled={!this.formIsChanged()}
testID='room-info-edit-view-reset'
>
<Text