diff options
author | Aijana Schumann <aijana.schumann@highstreet-technologies.com> | 2020-08-27 09:01:53 +0200 |
---|---|---|
committer | Aijana Schumann <aijana.schumann@highstreet-technologies.com> | 2020-08-27 11:52:38 +0200 |
commit | 4bd84bebdaa0c2d82050fbedd1fa8260eb62146d (patch) | |
tree | 3f26dfc6c7da0f176f31bcde112971b0b8c552ce /sdnr/wt/odlux/apps/configurationApp/src/views | |
parent | 958de10b4c433eb6110b93007f281b07515ed6fe (diff) |
Add link calculation app
Add link calculation app to odlux
Issue-ID: CCSDK-2562
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: Ifc0a5b2a8bb974dfd85d70a9f05990b1f11925a3
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/apps/configurationApp/src/views')
-rw-r--r-- | sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx b/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx index 385f3b52f..6465feb4e 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx +++ b/sdnr/wt/odlux/apps/configurationApp/src/views/configurationApplication.tsx @@ -284,8 +284,12 @@ class ConfigurationApplicationComponent extends React.Component<ConfigurationApp private renderUIElement = (uiElement: ViewElement, viewData: { [key: string]: any }, keyProperty: string | undefined, editMode: boolean, isNew: boolean) => { const isKey = (uiElement.label === keyProperty); const canEdit = editMode && (isNew || (uiElement.config && !isKey)); - if (isViewElementEmpty(uiElement)) { + + // do not show elements w/o any value from the backend + if (viewData[uiElement.id] == null && !editMode) { return null; + } else if (isViewElementEmpty(uiElement)) { + return null; } else if (isViewElementSelection(uiElement)) { return <UiElementSelection @@ -300,7 +304,7 @@ class ConfigurationApplicationComponent extends React.Component<ConfigurationApp } else if (isViewElementBoolean(uiElement)) { return <UiElementBoolean key={uiElement.id} - inputValue={viewData[uiElement.id] || ''} + inputValue={viewData[uiElement.id] == null ? '' : viewData[uiElement.id]} value={uiElement} readOnly={!canEdit} disabled={editMode && !canEdit} @@ -309,7 +313,7 @@ class ConfigurationApplicationComponent extends React.Component<ConfigurationApp } else if (isViewElementString(uiElement)) { return <UiElementString key={uiElement.id} - inputValue={viewData[uiElement.id] || ''} + inputValue={viewData[uiElement.id] == null ? '' : viewData[uiElement.id]} value={uiElement} isKey={isKey} readOnly={!canEdit} |