From 64618ffa80565e048b6ef89bac60687ca839d8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Gyarmati?= Date: Sat, 13 Jan 2024 02:26:49 +0100 Subject: [PATCH] fix(VSliderThumb): patch memory leak in `VSliderThumb` (#19024) fixes #19022 Co-authored-by: John Leider --- packages/vuetify/src/components/VSlider/VSliderThumb.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vuetify/src/components/VSlider/VSliderThumb.tsx b/packages/vuetify/src/components/VSlider/VSliderThumb.tsx index 69ab64540ea..1e8cce796df 100644 --- a/packages/vuetify/src/components/VSlider/VSliderThumb.tsx +++ b/packages/vuetify/src/components/VSlider/VSliderThumb.tsx @@ -84,6 +84,8 @@ export const VSliderThumb = genericComponent()({ indexFromEnd, } = slider + const elevationProps = computed(() => !disabled.value ? elevation.value : undefined) + const { elevationClasses } = useElevation(elevationProps) const { textColorClasses, textColorStyles } = useTextColor(thumbColor) const { pageup, pagedown, end, home, left, right, down, up } = keyValues @@ -129,7 +131,6 @@ export const VSliderThumb = genericComponent()({ useRender(() => { const positionPercentage = convertToUnit(indexFromEnd.value ? 100 - props.position : props.position, '%') - const { elevationClasses } = useElevation(computed(() => !disabled.value ? elevation.value : undefined)) return (