From b5b0baa03a5b48c31e51bc7392f973d093e21d35 Mon Sep 17 00:00:00 2001 From: muhammad-ahmed Date: Thu, 7 Nov 2024 13:45:02 +0800 Subject: [PATCH] ahmed/DAPI-811/fix--markup-percentage-on-scroll --- .../stepper-text-field/stepper-text-field.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/features/dashboard/components/stepper-text-field/stepper-text-field.tsx b/src/features/dashboard/components/stepper-text-field/stepper-text-field.tsx index df97ea64d..db5f15aec 100644 --- a/src/features/dashboard/components/stepper-text-field/stepper-text-field.tsx +++ b/src/features/dashboard/components/stepper-text-field/stepper-text-field.tsx @@ -27,6 +27,22 @@ const StepperTextField: React.FC = ({ const { register, watch } = useFormContext(); const value = watch(name); + const handleWheel = (event: WheelEvent) => { + event.preventDefault(); + }; + + React.useEffect(() => { + const input = document.querySelector('.stepper_text_field'); + if (input) { + input.addEventListener('wheel', handleWheel, { passive: false }); + } + return () => { + if (input) { + input.removeEventListener('wheel', handleWheel); + } + }; + }, []); + return (