From 8ff6a3a27e4b79329f86b1fdf259b476ddf8adcb Mon Sep 17 00:00:00 2001 From: devyaniChoubey <52153085+devyaniChoubey@users.noreply.github.com> Date: Tue, 28 Jan 2020 18:56:46 +0530 Subject: [PATCH] [FIX] Disable reset button if form didn't changed (#1569) Co-authored-by: Diego Mello --- app/views/RoomInfoEditView/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/RoomInfoEditView/index.js b/app/views/RoomInfoEditView/index.js index 3d6a61e8..2eab199c 100644 --- a/app/views/RoomInfoEditView/index.js +++ b/app/views/RoomInfoEditView/index.js @@ -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' >