Skip to content

Commit

Permalink
Minor fix to treeview Item description & Code improvement
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Nov 30, 2024
1 parent 08f2aa0 commit 1dab231
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ export default {
},
widgetItemLabel (includeItemName) {
const item = this.items.find(i => i.name === this.widget.config.item)
return (item?.label ?? this.widget.config.item) + (includeItemName ? ' (' + item?.name ?? '' + ')' : '')
return (item?.label || this.widget.config.item) + (includeItemName && item ? ` (${item.name})` : '')
},
widgetConfigDescription (includeItemName) {
const buttonPosition = this.widget.component === 'Button' ? ' (' + (this.widget.config?.row ?? '-') + ',' + (this.widget.config?.column ?? '-') + ')' : ''
const buttonPosition = this.widget.component === 'Button' ? ` (${this.widget.config?.row ?? '-'},${this.widget.config?.column ?? '-'})` : ''
return (this.widget.config?.item ? ': ' + this.widgetItemLabel(includeItemName) : '') + buttonPosition
}
}
Expand Down

0 comments on commit 1dab231

Please sign in to comment.