From 36cfb1d5156f58b8f4a15b8cdc01257e484fc6d4 Mon Sep 17 00:00:00 2001 From: Jamie V Date: Tue, 28 Mar 2023 08:58:15 -0700 Subject: [PATCH] [Condition Widgets] Keep styles for widgets with a URL (#6515) * call update style after view is update with current style rule manager styles for components (namely condition widget) that have DOM changes after the element is grabbed to style * target blank yo --------- Co-authored-by: Shefali Joshi --- src/plugins/conditionWidget/components/ConditionWidget.vue | 1 + src/ui/components/ObjectView.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/conditionWidget/components/ConditionWidget.vue b/src/plugins/conditionWidget/components/ConditionWidget.vue index f0c2877520..0d763c3e06 100644 --- a/src/plugins/conditionWidget/components/ConditionWidget.vue +++ b/src/plugins/conditionWidget/components/ConditionWidget.vue @@ -25,6 +25,7 @@ :is="urlDefined ? 'a' : 'span'" class="c-condition-widget u-style-receiver js-style-receiver" :href="url" + :target="url ? '_BLANK' : ''" >
{{ label }} diff --git a/src/ui/components/ObjectView.vue b/src/ui/components/ObjectView.vue index 3e0e75e78a..1f761de0f4 100644 --- a/src/ui/components/ObjectView.vue +++ b/src/ui/components/ObjectView.vue @@ -286,6 +286,7 @@ export default { this.openmct.objectViews.on('clearData', this.clearData); this.$nextTick(() => { + this.updateStyle(this.styleRuleManager?.currentStyle); this.getActionCollection(); }); },