数据表格2,建议增加单纯加载数据的方法
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 678
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 7
Description
数据表格2,已经有了 setDataSource 方法,但该方法需要设置一整套的数据源参数,大部分情况下只是数据本身发生改变,没有必要将数据源重新设置一次。
另外,虽然 dataSource 参数中的 getByIndex 可以很好的适应任意数据,但前端仍然需要编写若干代码处理数据,去适配 getByIndex 的调用规则,中间多了一层逻辑。常见的用例是,设置好表格参数,【直接】往里面加载【具体数据】,然后刷新。
建议:提供 loadData 或 setData 方法,直接设置 dataSource 中的 array,供表格展示。原型可以为:
function loadData(array, refresh)
array array 具体数据
refresh boolean 是否自动刷新,可选
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the data table 2 implementation and tracing setDataSource, especially its dataSource.array and refresh behavior. Done means a loadData or setData API can replace the displayed array directly, optionally refreshes when requested, and preserves the existing table configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100