mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:06:31 +00:00
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}
|
||||
addonAfter="%"
|
||||
defaultValue={value ? math.round(value * 100, 9) : null}
|
||||
min={0}
|
||||
formatter={(v: any) => (v ? math.round(v * 100, 9) : null)}
|
||||
onChange={(v: any) => {
|
||||
if (onChange) {
|
||||
onChange(v);
|
||||
const val = v ? math.round(v / 100, 9) : 0;
|
||||
onChange(val);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user