mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix bugs in make journal page.
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
const AccountCellRenderer = ({
|
||||
column: { id, value },
|
||||
row: { index, original },
|
||||
cell: { value: initialValue },
|
||||
payload: { accounts, updateData, errors },
|
||||
}) => {
|
||||
const handleAccountSelected = useCallback((account) => {
|
||||
|
||||
@@ -4,9 +4,9 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
|
||||
const InputEditableCell = ({
|
||||
value: initialValue,
|
||||
row: { index },
|
||||
column: { id },
|
||||
column: { id, },
|
||||
cell: { value: initialValue },
|
||||
payload,
|
||||
}) => {
|
||||
const [value, setValue] = useState(initialValue)
|
||||
|
||||
@@ -14,8 +14,13 @@ const MoneyFieldCellRenderer = ({
|
||||
setValue(value);
|
||||
}, []);
|
||||
|
||||
function isNumeric(data) {
|
||||
return !isNaN(parseFloat(data)) && isFinite(data) && data.constructor !== Array;
|
||||
}
|
||||
|
||||
const onBlur = () => {
|
||||
payload.updateData(index, id, parseFloat(value));
|
||||
const updateValue = isNumeric(value) ? parseFloat(value) : value;
|
||||
payload.updateData(index, id, updateValue);
|
||||
};
|
||||
|
||||
return (<MoneyInputGroup
|
||||
|
||||
Reference in New Issue
Block a user