From 913fd336422a48e096117565ce2f97c0ec5d6c5a Mon Sep 17 00:00:00 2001 From: Malini Date: Fri, 12 Dec 2025 11:20:40 +0530 Subject: [PATCH] removed count --- .../src/components/survey/ProductData/ProductData.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx b/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx index d01c5db..916950c 100644 --- a/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx +++ b/ipi-survey-platform/src/components/survey/ProductData/ProductData.jsx @@ -32,6 +32,13 @@ const Input = ({ placeholder = '', type = 'text', value = '', onChange = () => { } else if (value || isFocused) { borderColor = 'border-[#92722A]'; } + + // Prevent wheel event from changing the number input value + const handleWheel = (e) => { + if (type === 'number') { + e.target.blur(); + } + }; return (
@@ -42,6 +49,7 @@ const Input = ({ placeholder = '', type = 'text', value = '', onChange = () => { onChange={onChange} onFocus={() => setIsFocused(true)} onBlur={() => setIsFocused(false)} + onWheel={handleWheel} required={required} className={`block w-full h-10 rounded-md border-2 ${borderColor} focus:ring-0 px-4 text-sm ${bgColor} transition-colors [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none`} />