Skip to content

Commit

Permalink
chore: keep the Save Button Disabled Until the Status Value Changes. (#…
Browse files Browse the repository at this point in the history
…5569)

* SaveButtonDisableFeature

* code formatting

* Update index.tsx

---------

Co-authored-by: Amit Giri <thisisag840@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
  • Loading branch information
3 people authored Jun 24, 2024
1 parent b226543 commit 147b014
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/StatusView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ const StatusView = (): React.ReactElement => {
headerLeft: isMasterDetail ? undefined : () => <HeaderButton.CancelModal onPress={goBack} />,
headerRight: () => (
<HeaderButton.Container>
<HeaderButton.Item title={I18n.t('Save')} onPress={submit} testID='status-view-submit' />
<HeaderButton.Item
title={I18n.t('Save')}
onPress={submit}
disabled={status === user.status && statusText === user.statusText}
testID='status-view-submit'
/>
</HeaderButton.Container>
)
});
Expand Down

0 comments on commit 147b014

Please sign in to comment.