UNPKG

ttk-app-core

Version:
41 lines (36 loc) 1.02 kB
import {GridDecorator} from 'edf-component' function getGridOption() { return { 'details': { path: 'data.form.details', selectFieldName: 'selected', cellClassName: 'ttk-voucher-app-document-cell', emptyRow: {}, getColNames: (gf) => { return [ 'summary', 'accountingSubject', 'debitAmount', 'creditAmount', ] }, cellIsReadonly: (cellPosition, path, gf) => { return false } }, } } function actionCreator(option) { return { gridAction: new GridDecorator.action({ ...option, gridOption: getGridOption() }) } } function reducerCreator(option) { return { gridReducer: new GridDecorator.reducer({ ...option, gridOption: getGridOption() }) } } export default { actionCreator, reducerCreator }