validateInput when the value in the store changes (https://github.com/woocommerce/woocommerce-blocks/pull/11108)

This commit is contained in:
Mike Jolley 2023-10-05 10:27:10 +01:00 committed by GitHub
parent 04e298050c
commit eb383203f0
1 changed files with 2 additions and 0 deletions

View File

@ -166,6 +166,8 @@ const ValidatedTextInput = forwardRef<
if ( formattedValue !== value ) {
onChange( formattedValue );
} else {
validateInput( true );
}
}
}, [ validateInput, customFormatter, value, previousValue, onChange ] );