mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
fix: optimize item form performance.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import moment from 'moment';
|
||||
import _ from 'lodash';
|
||||
import {
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import Currency from 'js-money/lib/currency';
|
||||
import PProgress from 'p-progress';
|
||||
import accounting from 'accounting';
|
||||
@@ -284,4 +287,8 @@ export const transformToForm = (obj, emptyInitialValues) => {
|
||||
obj,
|
||||
(val, key) => val !== null && Object.keys(emptyInitialValues).includes(key),
|
||||
)
|
||||
}
|
||||
|
||||
export function inputIntent({ error, touched }){
|
||||
return error && touched ? Intent.DANGER : '';
|
||||
}
|
||||
Reference in New Issue
Block a user