From 23e0cbeb5f93939ecc43e87ca7fe68e91fdbc7c9 Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 23 Jan 2025 13:59:24 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EC=A6=90=EA=B2=A8=EC=B0=BE=EA=B8=B0=20=EC=83=89=EA=B9=94?= =?UTF-8?q?=EA=B5=AC=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../management/StuffSearchCondition.jsx | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/components/management/StuffSearchCondition.jsx b/src/components/management/StuffSearchCondition.jsx index 92cc1e04..48012f24 100644 --- a/src/components/management/StuffSearchCondition.jsx +++ b/src/components/management/StuffSearchCondition.jsx @@ -465,6 +465,7 @@ export default function StuffSearchCondition() { allList = res allList.sort((a, b) => (a.saleStoreId !== 'T01') - (b.saleStoreId !== 'T01') || a.saleStoreId - b.saleStoreId) favList = res.filter((row) => row.saleStoreId === 'T01' || row.priority !== 'B') + setSchSelSaleStoreList(allList) setFavoriteStoreList(favList) setShowSaleStoreList(favList) @@ -571,7 +572,7 @@ export default function StuffSearchCondition() { const onInputChange = (key) => { //내 물건보기 체크 풀어주기 setMyDataCheck(false) - + stuffSearch.schMyDataCheck = false if (key !== '') { setShowSaleStoreList(schSelSaleStoreList) } else { @@ -885,6 +886,31 @@ export default function StuffSearchCondition() { } } + const CustomOption = (props) => { + const { data, innerRef, innerProps, isSelected, isFocused, isDisabled } = props + const customClass = data.saleStoreId === 'T01' || data.priority !== 'B' ? 'special-option' : '' + // 기본 선택/호버 상태 적용 + const optionClass = `${customClass} ${isSelected ? 'custom__option--is-selected' : ''} ${isFocused ? 'custom__option--is-focused' : ''} ${isDisabled ? 'custom__option--is-disabled' : ''}` + console.log(optionClass) + return ( +
+ {data.label} +
+ ) + } + + const CustomOption2 = (props) => { + const { data, innerRef, innerProps, isSelected, isFocused, isDisabled } = props + const customClass = data.priority !== 'B' ? 'special-option' : '' + // 기본 선택/호버 상태 적용 + const optionClass = `${customClass} ${isSelected ? 'custom__option--is-selected' : ''} ${isFocused ? 'custom__option--is-focused' : ''} ${isDisabled ? 'custom__option--is-disabled' : ''}` + return ( +
+ {data.label} +
+ ) + } + return ( <> {/* 퍼블적용시작 */} @@ -1159,6 +1185,7 @@ export default function StuffSearchCondition() { })} isDisabled={session?.storeLvl !== '1' ? true : session?.storeId !== 'T01' ? true : false} isClearable={true} + components={{ Option: CustomOption }} /> )} {session?.storeId !== 'T01' && session?.storeLvl === '1' && ( @@ -1243,6 +1270,7 @@ export default function StuffSearchCondition() { value={otherSaleStoreList.filter(function (option) { return option.saleStoreId === otherSaleStoreId })} + components={{ Option: CustomOption2 }} />