diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-13 15:30:23 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-13 15:30:23 +0700 |
| commit | c18b82d1cc4342cc99f384da9b1236b25815e2d7 (patch) | |
| tree | 6314cd07ec838c6b26e5ab77499ee583a3b8de0e | |
| parent | baa029e404f499f7e09b9d9a152bd8c676411684 (diff) | |
<iman> fix bug
| -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()} |
