Skip to content

Commit 3c88f63

Browse files
committed
Fix empty form path source on edit
1 parent 20bbf2c commit 3c88f63

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/app/widget-config/dataset-chart-options/dataset-chart-options.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ export class DatasetChartOptionsComponent implements OnInit {
142142
this.datachartSource().enable();
143143
} else if (Object.keys(pathObject.sources).length > 1) {
144144
this.pathSources.set(Object.keys(pathObject.sources).sort());
145-
this.datachartSource().reset();
145+
if(this.datachartSource().value) {
146+
this.datachartSource().setValue(this.datachartSource().value);
147+
} else {
148+
this.datachartSource().reset();
149+
}
146150
this.datachartSource().enable();
147151
}
148152
}

src/app/widgets/widget-data-chart/widget-data-chart.component.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,15 @@ export class WidgetDataChartComponent implements AfterViewInit, OnDestroy {
105105
// Effect: react to Dataset config changes
106106
effect(() => {
107107
const sig = this.pathSignature();
108-
if (sig !== this.previousPathSignature) {
109-
untracked(() => {
110-
this.previousPathSignature = sig;
111-
this.rebuildForDataset(this.runtime.options());
112-
});
113-
}
108+
109+
untracked(() => {
110+
if (sig !== this.previousPathSignature) {
111+
untracked(() => {
112+
this.previousPathSignature = sig;
113+
this.rebuildForDataset(this.runtime.options());
114+
});
115+
}
116+
});
114117
});
115118

116119
// Effect: react to Display config or theme changes

0 commit comments

Comments
 (0)