From 096cb2f410c51871186f88b7c7f4084978a8cebd Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Mon, 13 Jan 2025 19:12:09 +0100 Subject: [PATCH 1/3] component Checkbox: add hasTooltip computed value Signed-off-by: Francesco Torchia --- .../src/components/Form/Checkbox/Checkbox.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkg/rancher-components/src/components/Form/Checkbox/Checkbox.vue b/pkg/rancher-components/src/components/Form/Checkbox/Checkbox.vue index 9bf64f0ad1e..492471f64da 100644 --- a/pkg/rancher-components/src/components/Form/Checkbox/Checkbox.vue +++ b/pkg/rancher-components/src/components/Form/Checkbox/Checkbox.vue @@ -135,7 +135,14 @@ export default defineComponent({ */ isChecked(): boolean { return this.isMulti(this.value) ? this.findTrueValues(this.value) : this.value === this.valueWhenTrue; - } + }, + + /** + * Determines if the Labeled Input should display a tooltip. + */ + hasTooltip(): boolean { + return !!this.tooltip || !!this.tooltipKey; + }, }, methods: { @@ -214,6 +221,9 @@ export default defineComponent({