gantd smart-table-g
npm install smart-table-g---
Dynamically and configurable column properties with Multiview support of table component based on antd with React
[![NPM version][npm-image]][npm-url]
[npm-image]: https://img.shields.io/npm/v/smart-table-g.svg
[npm-url]: https://www.npmjs.com/package/smart-table-g

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

- Dynamically and configurable column properties
- Dynamically configurable table style properties
- Multi-view support
``js
import React from 'react';
import SmartTable from 'smart-table-g';
import { Tag, Divider } from 'antd';
function BasicUse() {
const tableColumns = [
{
title: 'name',
fieldName: 'name',
render: text => {text},
},
{
title: 'age',
fieldName: 'age',
},
{
title: 'address',
fieldName: 'address',
},
{
title: 'tags',
fieldName: 'tags',
render: tags => (
{tags.map(tag => {
let color = tag.length > 5 ? 'geekblue' : 'green';
if (tag === 'loser') {
color = 'volcano';
}
return (
{tag.toUpperCase()}
);
})}
),
},
{
title: 'action',
fieldName: 'action',
render: (text, record) => (
invite {record.name}
delete
),
},
]
const dataSource = [
{
key: '1',
name: 'Mr someone1',
age: 32,
address: 'custom address',
tags: ['Otaku', 'Developer'],
},
{
key: '2',
name: 'Mr someone2',
age: 42,
address: 'custom address',
tags: ['Product manager'],
},
{
key: '3',
name: 'Mr someone3',
age: 32,
address: 'custom address',
tags: ['Teacher'],
},
]
return
React.render(
``
- Create a Github issue for bug reports, feature requests, or questions
- Follow @GantFDT for announcements
- Add a ⭐️ star on GitHub to support the project❤️!
GantFDT
MIT