table
table copied to clipboard
feat: support lazy expand
Ref: #48050
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
table | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 7, 2024 3:47am |
like
const load = async () => {
return new Promise(resolve => {
setTimeout(() => {
resolve("receive data");
},3000)
})
}
interface dataType {
key: number,
a?: string,
b?: string,
c?: string,
d?: number,
hasChildren?: boolean,
load?: () => void
}
const data: dataType[] = [
{ key: 0, a: '123', hasChildren: true, load: load},
{ key: 1, a: 'cdd', b: 'edd' },
{ key: 2, a: '1333', c: 'eee', d: 2 },
];
const columns = [
{ title: 'title 1', dataIndex: 'a', key: 'a', width: 100 },
{ title: 'title 2', dataIndex: 'b', key: 'b', width: 100 },
{ title: 'title 3', dataIndex: 'c', key: 'c', width: 200 },
];
https://github.com/react-component/table/assets/73218815/4698157f-8c89-4ad3-bab2-b5ca45961550
还没写test