Repository navigation
feat: 给表格增加一个配置项 - #5335
feat: 给表格增加一个配置项#5335rubbishmaker wants to merge 4 commits into
Conversation
|
有两处阻塞性问题需要修正后再合并:
|
- Clamp column width by the target value's out-of-bounds direction so non-realtime mode no longer reverse-resizes to the far min/max boundary when the whole pending delta is applied at once. - Stop double-subtracting the accumulated delta on the adaptive neighbor column/row, keeping the final size consistent with the indicator line and realtime mode. - Add deterministic regression cases for non-realtime min clamp and adaptive neighbor column/row resize. - Mount the resize-realtime example toggle inside the table root element so it no longer leaks onto other demos.
| state.columnResize.pendingDeltaX | ||
| ); | ||
| state.table.scenegraph.updateNextFrame(); | ||
| return; |
There was a problem hiding this comment.
[P1] 非实时拖拽提交后应通知依赖 resize_column 的布局同步
当甘特图通过公开的 taskListTable: { tableWidth: 'auto', resize: { realtime: false } } 配置启用非实时列拖拽时,此处只累计位移便返回,因此 container-dom.ts 在每次鼠标移动后发出的 resize_column 携带的 colWidth 始终是旧值;松开时 endResizeCol() 虽提交新宽度并发出 resize_column_end,却不再发出 resize_column。packages/vtable-gantt/src/state/gantt-table-sync.ts 的 syncTableWidthFromTable() 只监听 resize_column 来调用 _syncTableSize(),导致任务列表变宽后甘特图起点、分隔线与画布宽度仍停留在旧位置(缩窄时也会留空)。行高的 resize_row 同样会在新模式下仅报告旧值。建议提交后通知依赖过程事件的调用方(或使相关调用方改为监听结束事件),并补跨包回归验证。此问题不同于现有讨论的 min/max 反向调整和 adaptive 重复扣减,影响的是最终尺寸正确时仍未同步的跨包布局。
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
#4809
💡 Background and solution
📝 Changelog
增加一个配置项realtime,用于控制表格的resize行为。默认为true,与当前行为保持一致,为false时不会实时渲染,拖拽中 :只累积偏移量
pendingDelta+ 移动指示线,不重排列宽/行高,松开时 :一次性把累计偏移应用到真实列宽/行高| ---------- | --------- |
| 🇺🇸 English | |
| 🇨🇳 Chinese | |
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough