JSPM

  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q48144F
  • License MIT

gantd table

Package Exports

  • table-g
  • table-g/lib/index.js
  • table-g/lib/style
  • table-g/lib/style/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (table-g) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

table-g


Enhanced table component based on antd with React

NPM version

Screenshot

Demo

online example: https://favori.gitee.io/gantd-landing (CodePen)

install

rc-tabs

Feature

  • Collapsible columns
  • Smooth scrolling under big data
  • Support in cell editing
  • Support Infinite data loading

Usage

import React from 'react';
import Table from 'table-g';

function BasicUse() {
   const columns = [
    {
      title: 'name',
      dataIndex: 'name',
      key: 'name',
      showTip: true,
    },
    {
      title: 'age',
      dataIndex: 'age',
      key: 'age',
    },
    {
      title: 'address',
      dataIndex: 'address',
      key: 'address',
    },
  ];

  const dataSource = useMemo(() => getList(), [])
  const [resizable, setresizable] = useState(true)

  const toggleResizable = useCallback(() => {
      setresizable(r => !r)
    },[])

  const headerRight = useMemo(() => {
    return <Button onClick={toggleResizable} >switch to resize columns</Button>
  }, [])

  return <Table
    columns={columns}
    dataSource={dataSource}
    resizable={resizable}
    headerRight={headerRight}
  />
}

React.render(<BasicUse/>, mountNode);

API

Documentation

Contact

Anthor

GantFDT

License

MIT