mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:26:45 +00:00
fix(data-vi): number becomes string after precision transformation (#4092)
This commit is contained in:
parent
78ea107edb
commit
2d9ed8d1ff
@ -20,7 +20,6 @@ export const useFieldSelectProps = (fields: FieldOption[]) =>
|
||||
if (!value) {
|
||||
typeField.setState({
|
||||
value: null,
|
||||
disabled: true,
|
||||
});
|
||||
}
|
||||
const fieldProps = selectedFields.find((field) => field.value === value);
|
||||
@ -41,13 +40,11 @@ export const useFieldSelectProps = (fields: FieldOption[]) =>
|
||||
if (supports.includes(key)) {
|
||||
typeField.setState({
|
||||
value: key,
|
||||
disabled: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
typeField.setState({
|
||||
value: null,
|
||||
disabled: false,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ const transformers: {
|
||||
{ label: '1.000', value: 3 },
|
||||
],
|
||||
},
|
||||
fn: (val: number, precision: number) => val.toFixed(precision),
|
||||
fn: (val: number, precision: number) => Number(val.toFixed(precision)),
|
||||
},
|
||||
Separator: {
|
||||
schema: {
|
||||
|
Loading…
Reference in New Issue
Block a user