Skip to content

Commit

Permalink
Update logic to disable the save button instead of hiding it
Browse files Browse the repository at this point in the history
  • Loading branch information
hichamboushaba committed Oct 2, 2024
1 parent fa28ff0 commit c04e5f3
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,11 @@ private fun CustomFieldsScreen(
title = stringResource(id = R.string.custom_fields_list_title),
onNavigationButtonClick = onBackClick,
actions = {
if (state.hasChanges) {
WCTextButton(
text = stringResource(id = R.string.save),
onClick = onSaveClicked
)
}
WCTextButton(
text = stringResource(id = R.string.save),
onClick = onSaveClicked,
enabled = state.hasChanges
)
}
)
},
Expand Down

0 comments on commit c04e5f3

Please sign in to comment.