luckysheet-react
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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;

Package Sidebar

Install

npm i luckysheet-react

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

50.4 MB

Total Files

19

Last publish

Collaborators

  • tomscavo