easysoft / easysoft/zui

数据表格2,建议增加单纯加载数据的方法

Open
#159 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2.8k
Forks
678
Avg merge
6d 21h
Merged PRs (30d)
7

Description

数据表格2,已经有了 setDataSource 方法,但该方法需要设置一整套的数据源参数,大部分情况下只是数据本身发生改变,没有必要将数据源重新设置一次。

另外,虽然 dataSource 参数中的 getByIndex 可以很好的适应任意数据,但前端仍然需要编写若干代码处理数据,去适配 getByIndex 的调用规则,中间多了一层逻辑。常见的用例是,设置好表格参数,【直接】往里面加载【具体数据】,然后刷新。

建议:提供 loadDatasetData 方法,直接设置 dataSource 中的 array,供表格展示。原型可以为:
function loadData(array, refresh)
array array 具体数据
refresh boolean 是否自动刷新,可选

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.