import * as React from 'react'; import SpreadSheet from '../../../SpreadSheetProvider'; import { IColumn, IRow } from '../../../index.data'; import { FormulaManagerConfig } from '../../../formula-manager/index.data'; import { SpreadSheetProps } from '../../..'; import { IRowWithCell } from '../../../SpreadSheetProvider/index.data'; import { helpers } from '../helper'; const columns: IColumn[] = [{ width: 60, type: 'numeric' }]; const rows = [ { id: 1, i: 0, type: 'body' as any, level: 1, cells: [ { id: 11, value: 1, rowId: 1, i: 0, j: 0, formula: `sumChildren()`, formulaDisabled: true, }, ], }, { id: 2, i: 1, type: 'body' as any, level: 1, sealed: true, cells: [ { id: 12, value: 1, rowId: 2, i: 1, j: 0, formula: `sumSibling()`, formulaDisabled: true }, ], }, ]; class Story extends React.Component<{ env?: 'test' }> { ref = React.createRef(); render() { return (
目的1: 检查插入行时, 相应的FormulaDisabled设置是否正常 ( 不用检查结果 )
目的2: 是否可正确撤销 / 重做
); } } const formulaConfig: SpreadSheetProps['formulaConfig'] = { userFormula: 'byName', } as any; export default Story;