Reset valid state on cancel in "TextSettingDialog"
In case an empty value was considered to be invalid, the invalid error text was only shown after closing the dialog and opening it again.
This commit is contained in:
@@ -62,6 +62,7 @@ export const TextSettingDialog = ({
|
||||
const closeDialog = (resetValue: boolean = true) => {
|
||||
if (resetValue) {
|
||||
setDialogValue(value ?? '');
|
||||
setIsValidValue(true);
|
||||
}
|
||||
|
||||
setIsDialogOpen(false);
|
||||
|
||||
Reference in New Issue
Block a user