mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
number/percentage csv parser
This commit is contained in:
@@ -22,5 +22,12 @@ export const config: IFieldConfig = {
|
||||
TableCell: withBasicCell(BasicCell),
|
||||
TableEditor: TextEditor,
|
||||
SideDrawerField,
|
||||
csvImportParser: (v) => {
|
||||
try {
|
||||
return parseFloat(v);
|
||||
} catch (e) {
|
||||
return v;
|
||||
}
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
|
||||
@@ -24,5 +24,12 @@ export const config: IFieldConfig = {
|
||||
TableCell: withBasicCell(BasicCell),
|
||||
TableEditor: TextEditor,
|
||||
SideDrawerField,
|
||||
csvImportParser: (v) => {
|
||||
try {
|
||||
return parseFloat(v);
|
||||
} catch (e) {
|
||||
return v;
|
||||
}
|
||||
},
|
||||
};
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user