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
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: update option when table width change\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
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
Loading