Skip to content

Commit

Permalink
refactor: apply updated widget options
Browse files Browse the repository at this point in the history
Signed-off-by: yuda <[email protected]>
  • Loading branch information
yuda110 committed Dec 18, 2024
1 parent 69e9320 commit 2b7b486
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ export const useWidgetFrame = (
) => {
const _state = reactive({
widgetConfig: computed(() => getWidgetConfig(props.widgetName)),
showWidgetHeader: computed<boolean>(() => props.widgetOptions?.widgetHeader?.toggleValue || false),
showWidgetHeader: computed<boolean>(() => props.widgetOptions?.widgetHeader?.value?.toggleValue || false),
title: computed(() => {
if (_state.showWidgetHeader) return props.widgetOptions?.widgetHeader?.title;
if (_state.showWidgetHeader) return props.widgetOptions?.widgetHeader?.value?.title;
return undefined;
}),
description: computed(() => {
if (_state.showWidgetHeader) return props.widgetOptions?.widgetHeader?.description;
if (_state.showWidgetHeader) return props.widgetOptions?.widgetHeader?.value?.description;
return undefined;
}),
size: computed<WidgetSize>(() => {
Expand Down Expand Up @@ -193,7 +193,7 @@ export const useWidgetFrame = (
return overrides.noData?.value || false;
}),
annotation: computed<string|undefined>(() => {
const _displayAnnotation = props.widgetOptions?.displayAnnotation as DisplayAnnotationValue;
const _displayAnnotation = props.widgetOptions?.displayAnnotation?.value as DisplayAnnotationValue;
if (!_displayAnnotation?.toggleValue) return undefined;
return _displayAnnotation?.annotation;
}),
Expand Down

0 comments on commit 2b7b486

Please sign in to comment.