Skip to content
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

Fix/update list tabel option #3214

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: update option when table width change
  • Loading branch information
ouliang committed Dec 25, 2024
commit 9dccf9f6fc60fe93b6764b854569c43c82a17002
16 changes: 6 additions & 10 deletions packages/vtable-gantt/src/Gantt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -945,26 +945,22 @@ export class Gantt extends EventTarget {

this._sortScales();
initOptions(this);
if (this.taskListTableInstance) {
const listTableOption = this._generateListTableOptions();
this.taskListTableInstance.updateOption(listTableOption);
}
this._syncPropsFromTable();
this.scenegraph.updateStageBackground();
this.data.setRecords(this.records);
this._generateTimeLineDateMap();

this.timeLineHeaderLevel = this.parsedOptions.sortedTimelineScales.length;
this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : '0px';

this._updateSize();

if (this.taskListTableInstance) {
const listTableOption = this._generateListTableOptions();
this.taskListTableInstance.updateOption(listTableOption);
this._updateListTableSize(this.taskListTableInstance);
}
this._syncPropsFromTable();

updateSplitLineAndResizeLine(this);
this.scenegraph.updateSceneGraph();

this.scenegraph.afterCreateSceneGraph();
this._resize();
this._scrollToMarkLine();
}
setRecords(records: any[]) {
Expand Down