From ac607c2a90c6d4b4953ca8b68ae3d27917e76745 Mon Sep 17 00:00:00 2001 From: bartbutenaers Date: Sat, 7 Dec 2024 22:40:39 +0100 Subject: [PATCH 1/2] switch custom icon not clickable --- ui/src/widgets/ui-switch/UISwitch.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/src/widgets/ui-switch/UISwitch.vue b/ui/src/widgets/ui-switch/UISwitch.vue index a6c70814..22841af6 100644 --- a/ui/src/widgets/ui-switch/UISwitch.vue +++ b/ui/src/widgets/ui-switch/UISwitch.vue @@ -26,7 +26,15 @@ readonly @click.stop="switchClickable ? toggle() : null" /> - + From cf43fea63f4ccaed4bb38986c7b05ec9742abb00 Mon Sep 17 00:00:00 2001 From: Joe Pavitt Date: Tue, 10 Dec 2024 15:44:42 +0000 Subject: [PATCH 2/2] Include pointer-events: none --- ui/src/widgets/ui-switch/UISwitch.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/widgets/ui-switch/UISwitch.vue b/ui/src/widgets/ui-switch/UISwitch.vue index 22841af6..4c4f693f 100644 --- a/ui/src/widgets/ui-switch/UISwitch.vue +++ b/ui/src/widgets/ui-switch/UISwitch.vue @@ -21,6 +21,7 @@ v-if="!icon" v-model="status" :disabled="!state.enabled" :class="{'active': status, 'nrdb-ui-switch-default-cursor': !switchClickable}" + :style="{'pointer-events': switchClickable ? 'inherit' : 'none'}" hide-details="auto" color="primary" :loading="loading ? (status === true ? 'secondary' : 'primary') : null" readonly @@ -30,7 +31,7 @@ v-else-if="!loading" variant="text" :disabled="!state.enabled" - :style="{cursor: switchClickable ? 'pointer' : 'default'}" + :style="{'pointer-events': switchClickable ? 'inherit' : 'none', cursor: switchClickable ? 'pointer' : 'default'}" :icon="icon" :color="color" @click.stop="switchClickable ? toggle() : null"