mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
percentage: fix inline table editor
This commit is contained in:
@@ -24,8 +24,10 @@ export default function TextEditor({ row, column }: EditorProps<any>) {
|
||||
return () => {
|
||||
const newValue = inputRef.current?.value;
|
||||
if (newValue !== undefined && updateCell) {
|
||||
if (type === FieldType.number || type === FieldType.percentage) {
|
||||
if (type === FieldType.number) {
|
||||
updateCell(row.ref, column.key, Number(newValue));
|
||||
} else if (type === FieldType.percentage) {
|
||||
updateCell(row.ref, column.key, Number(newValue) / 100);
|
||||
} else {
|
||||
updateCell(row.ref, column.key, newValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user