removed count
This commit is contained in:
parent
644a3322df
commit
913fd33642
@ -32,6 +32,13 @@ const Input = ({ placeholder = '', type = 'text', value = '', onChange = () => {
|
|||||||
} else if (value || isFocused) {
|
} else if (value || isFocused) {
|
||||||
borderColor = 'border-[#92722A]';
|
borderColor = 'border-[#92722A]';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent wheel event from changing the number input value
|
||||||
|
const handleWheel = (e) => {
|
||||||
|
if (type === 'number') {
|
||||||
|
e.target.blur();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
@ -42,6 +49,7 @@ const Input = ({ placeholder = '', type = 'text', value = '', onChange = () => {
|
|||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
onFocus={() => setIsFocused(true)}
|
onFocus={() => setIsFocused(true)}
|
||||||
onBlur={() => setIsFocused(false)}
|
onBlur={() => setIsFocused(false)}
|
||||||
|
onWheel={handleWheel}
|
||||||
required={required}
|
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`}
|
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`}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user