diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-11 14:11:57 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-11 14:11:57 +0700 |
| commit | 2e1c0fb77932bdd0681f8d7c9cfd292a9ac52b3b (patch) | |
| tree | 89afc98dc8ddb7523f8313c534006d670af100c5 /src-migrate/modules | |
| parent | 337e0f377624e5a0b46aa0ed3c3c16ba4e289965 (diff) | |
<iman> update undifined select category
Diffstat (limited to 'src-migrate/modules')
| -rw-r--r-- | src-migrate/modules/product-detail/components/Information.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx index 590e8afd..3c2eb537 100644 --- a/src-migrate/modules/product-detail/components/Information.tsx +++ b/src-migrate/modules/product-detail/components/Information.tsx @@ -66,7 +66,7 @@ const Information = ({ product }: Props) => { }, [selectedVariant]); const handleOnChange = (vals: any) => { - let code = vals.split(' ')[0]; + let code = vals.replace(/\s-\s.*$/, '').trim(); let variant = variantOptions.find((item) => item.code === code); setSelectedVariant(variant); setInputValue( |
