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
Screenshot
Demo
online example: https://favori.gitee.io/gantd-landing (CodePen)
install
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
Contact
- Create a Github issue for bug reports, feature requests, or questions
- Follow @GantFDT for announcements
- Add a ⭐️ star on GitHub to support the project❤️!
Anthor
GantFDT
License
MIT
