diff options
Diffstat (limited to 'src-migrate/modules')
| -rw-r--r-- | src-migrate/modules/product-detail/components/Information.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx index d500ff6e..b9f4be91 100644 --- a/src-migrate/modules/product-detail/components/Information.tsx +++ b/src-migrate/modules/product-detail/components/Information.tsx @@ -12,7 +12,7 @@ import { useEffect, useRef, useState } from 'react'; import currencyFormat from '@/core/utils/currencyFormat'; import { InputGroup, InputRightElement } from '@chakra-ui/react'; -import { ChevronDownIcon, XMarkIcon } from '@heroicons/react/24/outline'; +import { ChevronDownIcon } from '@heroicons/react/24/outline'; import Image from 'next/image'; import { formatToShortText } from '~/libs/formatNumber'; import { createSlug } from '~/libs/slug'; @@ -68,6 +68,7 @@ const Information = ({ product }: Props) => { }, [selectedVariant]); const handleOnChange = (vals: any) => { + setDisableFilter(true); let code = vals.replace(/\s-\s.*$/, '').trim(); let variant = variantOptions.find((item) => item.code === code); setSelectedVariant(variant); @@ -109,12 +110,9 @@ const Information = ({ product }: Props) => { ref={inputRef} value={inputValue as string} onChange={(e) => handleOnKeyUp(e)} + onFocus={() => setDisableFilter(true)} /> <InputRightElement className='mr-4'> - <XMarkIcon - className='h-6 w-6 text-gray-500' - onClick={() => setDisableFilter(true)} - /> <ChevronDownIcon className='h-6 w-6 text-gray-500' onClick={() => inputRef?.current?.focus()} |
