Usage
import Luckysheet, { sheetAPI } from 'luckysheet-react';
const luckyCss = {
margin: '0px',
padding: '0px',
position: 'absolute',
width: '100%',
height: '100%',
left: '0px',
top: '100px'
};
const Index = () => (
<Luckysheet
style={luckyCss}
lang="zh"
column={0}
hook = {{
cellEditBefore(e: any) {
console.log('e', e);
},
cellUpdateBefore(e: any) {
console.log('e', e);
}
}}
columnConfig={columnConfig}
customCell={() => null}
insertColumn={insertColumn}
/>
)
export default Index;
API | Description | Type |
---|---|---|
columnConfig | the configuration of column |
{ asset?: any; check: string[]; comment?: any; default_value?: any; exports: any[]; parse_type: string; refers: any[]; serialize_version: number; style: Style; field: string; header_name: string; }[] |
customCell | custom cell renderers | props => React.ReactNode; |
insertColumn | custom insert column function | (index: number) => void; |