Prettified Code!

This commit is contained in:
gabek
2021-05-23 06:28:21 +00:00
committed by GitHub Action
parent d0eb1446f3
commit 5371559c74
4 changed files with 19 additions and 18 deletions

View File

@@ -71,7 +71,10 @@ export default function TextFieldWithSubmit(props: TextFieldWithSubmitProps) {
// if field is required but value is empty, or equals initial value, then don't show submit/update button. otherwise clear out any result messaging and display button.
const handleChange = ({ fieldName: changedFieldName, value: changedValue }: UpdateArgs) => {
if (onChange) {
onChange({ fieldName: changedFieldName, value: useTrim ? changedValue.trim() : changedValue });
onChange({
fieldName: changedFieldName,
value: useTrim ? changedValue.trim() : changedValue,
});
}
};