VisActor / VisActor/VTable

[Bug] 在自定义customLayout 中调用table.changeCellValues 有错误抛出,但页面能正常刷新

Open
#4,398 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.7k
Forks
486
Avg merge
1d 19h
Merged PRs (30d)
16

Description

Version

1.19.7

Link to Minimal Reproduction

customLayout

Steps to Reproduce

customLayout: (args: any) => { const checkbox = new CheckBox({
text: {
text: ‘xxx’,
},
})
checkbox.render()
rowContainer.appendChild(checkbox)
checkbox.addEventListener('checkbox_state_change', (args: any) => {
const { detail } = args
// 逻辑处理
// 调用数据更新
table.changeCellValues(col, row, ‘aaa’)
}) }

Current Behavior

自定义了customLayout, 加了一个checkbox 控制单元格数据动态显示,在监听事件中调用了 table.changeCellValues(col, row, ‘aaa’), 页面可正常刷新显示,但抛出异常

Image
Expected Behavior

无异常抛出

Environment
- OS:
- Browser:
- Framework:
Any additional comments?

No response

Contributor guide

Open the contributing guide

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 reproducing the issue in the customLayout callback, focusing on the checkbox_state_change listener and its call to table.changeCellValues(col, row, 'aaa'). Compare the thrown exception with the successful page refresh, then verify that the same update completes without an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.