mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: checkbox cell.
This commit is contained in:
@@ -11,7 +11,7 @@ const CheckboxEditableCell = ({
|
||||
const [value, setValue] = React.useState(initialValue);
|
||||
|
||||
const onChange = (e) => {
|
||||
setValue(e.target.value);
|
||||
setValue(e.target.checked);
|
||||
};
|
||||
const onBlur = () => {
|
||||
payload.updateData(index, id, value);
|
||||
@@ -24,12 +24,13 @@ const CheckboxEditableCell = ({
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
// intent={error ? Intent.DANGER : null}
|
||||
intent={error ? Intent.DANGER : null}
|
||||
className={classNames(Classes.FILL)}
|
||||
>
|
||||
<Checkbox
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
checked={initialValue}
|
||||
onBlur={onBlur}
|
||||
minimal={true}
|
||||
className="ml2"
|
||||
|
||||
@@ -79,10 +79,7 @@ function ExpenseForm({
|
||||
}
|
||||
const categories = values.categories.filter(
|
||||
(category) =>
|
||||
category.amount &&
|
||||
category.index &&
|
||||
category.expense_account_id &&
|
||||
category.landed_cost,
|
||||
category.amount && category.index && category.expense_account_id,
|
||||
);
|
||||
|
||||
const form = {
|
||||
|
||||
@@ -31,7 +31,7 @@ export const defaultExpenseEntry = {
|
||||
amount: '',
|
||||
expense_account_id: '',
|
||||
description: '',
|
||||
landed_cost: false,
|
||||
landed_cost: 0,
|
||||
};
|
||||
|
||||
export const defaultExpense = {
|
||||
|
||||
Reference in New Issue
Block a user