fix: percent value should divide by 100 (#2781)
This commit is contained in:
parent
08d4994305
commit
79f9e04413
@ -13,10 +13,11 @@ export const Percent = connect(
|
|||||||
{...props}
|
{...props}
|
||||||
addonAfter="%"
|
addonAfter="%"
|
||||||
defaultValue={value ? math.round(value * 100, 9) : null}
|
defaultValue={value ? math.round(value * 100, 9) : null}
|
||||||
min={0}
|
formatter={(v: any) => (v ? math.round(v * 100, 9) : null)}
|
||||||
onChange={(v: any) => {
|
onChange={(v: any) => {
|
||||||
if (onChange) {
|
if (onChange) {
|
||||||
onChange(v);
|
const val = v ? math.round(v / 100, 9) : 0;
|
||||||
|
onChange(val);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user