@dilicorp/ui 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,12 +15,12 @@ export const InputCurrency = ({ attrs, handleChange, currency, name }) => {
|
|
|
15
15
|
const numericValue = numberHelper.currencySanitize(rawValue, locale, format);
|
|
16
16
|
// Nenhum dígito restante — campo foi completamente limpo
|
|
17
17
|
if (numericValue === null) {
|
|
18
|
-
handleChange({ currentTarget: { name, value:
|
|
18
|
+
handleChange({ currentTarget: { name, value: '' } });
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
// Usuário está apagando e o valor resultante seria zero — limpa o campo
|
|
22
22
|
if (isDeletingRef.current && Number(numericValue) === 0) {
|
|
23
|
-
handleChange({ currentTarget: { name, value:
|
|
23
|
+
handleChange({ currentTarget: { name, value: '' } });
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
const formatted = numberHelper.currency(Number(numericValue), locale, format);
|