This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 55230acdb1 fix(#3380): Fix editing of data views (#3381)
55230acdb1 is described below
commit 55230acdb1f14ec4b74ed321bf0db55c53fd3ce2
Author: Philipp Zehnder <[email protected]>
AuthorDate: Thu Dec 19 16:51:59 2024 +0100
fix(#3380): Fix editing of data views (#3381)
---
.../data-explorer-widget-data-settings.component.ts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git
a/ui/src/app/data-explorer/components/data-view/data-view-designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
b/ui/src/app/data-explorer/components/data-view/data-view-designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
index c2de37bfd2..3a6c2e3f2b 100644
---
a/ui/src/app/data-explorer/components/data-view/data-view-designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
+++
b/ui/src/app/data-explorer/components/data-view/data-view-designer-panel/data-settings/data-explorer-widget-data-settings.component.ts
@@ -239,7 +239,7 @@ export class DataExplorerWidgetDataSettingsComponent
implements OnInit {
}
createDefaultWidget(): void {
- if (this.dataConfig.sourceConfigs.length === 1) {
+ if (this.checkIfDefaultTableShouldBeShown()) {
const fields = this.fieldProviderService.generateFieldLists(
this.dataConfig.sourceConfigs,
);
@@ -253,6 +253,16 @@ export class DataExplorerWidgetDataSettingsComponent
implements OnInit {
}
}
+ /**
+ * This method checks if there is at least one data source and that no
widget type is already configured.
+ */
+ checkIfDefaultTableShouldBeShown(): boolean {
+ return (
+ this.dataConfig.sourceConfigs.length === 1 &&
+ !this.currentlyConfiguredWidget.widgetType
+ );
+ }
+
removeSourceConfig(index: number) {
this.dataConfig.sourceConfigs.splice(index, 1);
}