-
Notifications
You must be signed in to change notification settings - Fork 435
Feat/support cell values change #4926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Feat/support cell values change #4926
Conversation
允许 triggerEvent 参数接受 'change_cell_values' 字符串值,用于精确控制是否触发 CHANGE_CELL_VALUES 事件
为addRecord、addRecords、deleteRecords和updateRecords方法添加triggerEvent可选参数 当triggerEvent为false时,不触发对应的事件通知
…es_change Feat/support cell values change
添加syncRecordOperationsToSourceRecords配置选项,当设置为true时,表格的增删改操作会同步到原始records数组 修改DataSource类实现源数据同步逻辑,包括添加、删除和更新记录时对原始数据的处理 添加相关测试用例验证同步功能 在示例中添加同步选项的UI控制
| silentChangeCellValuesEvent?: boolean | ||
| ) => Promise<boolean[][]> | boolean[][]; | ||
| changeCellValueByRecord: ( | ||
| recordIndex: number | number[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是对应原始records的index吧
| silentChangeCellValuesEvent?: boolean | ||
| ) => void; | ||
| changeCellValuesBySource: ( | ||
| changeValues: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有了syncto的配置 这两个接口可以去掉
| /** 删除能力是否只应用到可编辑单元格 */ | ||
| deleteWorkOnEditableCell?: boolean; | ||
| /** 删除范围时聚合成一次 change_cell_values 事件 */ | ||
| aggregateDeleteToOneChangeCellValuesEvent?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
batchCallChangeCellValuesApi
| value: string | number | null, | ||
| workOnEditableCell?: boolean, | ||
| triggerEvent?: boolean, | ||
| silentChangeCellValuesEvent?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noTriggerChangeCellValuesEvent
| } = { clearRowHeightCache: true } | ||
| ) { | ||
| this.scenegraph.clearCells(); | ||
| (this.dataSource as any).clearForceVisibleRecords?.(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clear和create map对象的地方请写明接口适用场景和背景
| @@ -0,0 +1,11 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
新增的配置和接口 请同步更新到docs官网中
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
本 PR 汇总最近 22 次提交,聚焦在「数据操作能力增强 + 事件触发可控 + 过滤场景数据插入修复 + 搜索高亮性能优化」,并同步补齐类型/示例/测试与发布日志。
📝 Changelog
Language Changelog 🇺🇸 English Enhance ListTable data operations: add syncRecordOperationsToSourceRecords , make record CRUD events optional via triggerEvent , introduce recordIndex-based cell update APIs, add silentChangeCellValuesEvent to suppress change_cell_values , fix wrong insert position under filtering, and optimize search highlight latency. Update typings, tests, examples, and docs/release logs. 🇨🇳 Chinese 增强 ListTable 数据操作能力:新增 syncRecordOperationsToSourceRecords 支持操作同步到源数据;增删改记录接口新增 triggerEvent 控制事件触发;新增基于 recordIndex 的单元格改值/批量改值 API,并新增 silentChangeCellValuesEvent 用于抑制 change_cell_values ;修复过滤状态下新增记录位置错误;优化搜索高亮更新延迟。同步更新类型、测试、示例与发布/文档记录。
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough