Skip to content

Feat/change cell value#3700

Merged
fangsmile merged 2 commits into
VisActor:developfrom
BlInYo:feat/changeCellValue
Apr 9, 2025
Merged

Feat/change cell value#3700
fangsmile merged 2 commits into
VisActor:developfrom
BlInYo:feat/changeCellValue

Conversation

@BlInYo
Copy link
Copy Markdown
Contributor

@BlInYo BlInYo commented Apr 5, 2025

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Refactoring
  • Update dependency
  • Code style optimization
  • Test Case
  • Branch merge
  • Site / documentation update
  • Demo update
  • Workflow
  • Chore
  • Release
  • Other (about what?)

🔗 Related issue link

close #3692

💡 Background and solution

listTable added dispatchOnValueChange parameter to changeCellValue

// packages/vtable/src/ListTable.ts
changeCellValue(
    col: number,
    row: number,
    value: string | number | null,
    workOnEditableCell = false,
    dispatchOnValueChange = true
  )
// packages/vtable/src/core/record-helper.ts
if (oldValue !== changedValue && dispatchOnValueChange) {
      table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
        col,
        row,
        rawValue: beforeChangeValue,
        currentValue: oldValue,
        changedValue
      });
    }

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

@BlInYo BlInYo force-pushed the feat/changeCellValue branch 2 times, most recently from 109b0ac to 23dbecf Compare April 5, 2025 12:33
Comment thread packages/vtable/src/ListTable.ts
Comment thread packages/vtable/src/ListTable.ts
Copy link
Copy Markdown
Contributor

@fangsmile fangsmile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请改一下吧 我评论了

@BlInYo BlInYo force-pushed the feat/changeCellValue branch from 23dbecf to 5de71ec Compare April 8, 2025 13:38
@github-actions github-actions Bot added the docs label Apr 8, 2025
@fangsmile fangsmile merged commit 63fcb95 into VisActor:develop Apr 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

我在实现undo和redo功能的时候遇到了一些问题

2 participants