fix(category): top level category bug
This commit is contained in:
parent
b71e503c8f
commit
49b3ce4205
@ -252,18 +252,24 @@ export const CategoryFilterPopup = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{(categoriesData as Category[]).map((category, i) => (
|
{(categoriesData as Category[]).map((category) => {
|
||||||
|
const name =
|
||||||
|
typeof category === 'string' ? category : category.name
|
||||||
|
return (
|
||||||
<CategoryCheckbox
|
<CategoryCheckbox
|
||||||
key={`${category.name}_${i}`}
|
key={name}
|
||||||
inputValue={inputValue}
|
inputValue={inputValue}
|
||||||
category={category}
|
category={category}
|
||||||
path={[category.name]}
|
path={[name]}
|
||||||
handleSingleSelection={handleSingleSelection}
|
handleSingleSelection={handleSingleSelection}
|
||||||
handleCombinationSelection={handleCombinationSelection}
|
handleCombinationSelection={
|
||||||
|
handleCombinationSelection
|
||||||
|
}
|
||||||
selectedSingles={filterCategories}
|
selectedSingles={filterCategories}
|
||||||
selectedCombinations={filterHierarchies}
|
selectedCombinations={filterHierarchies}
|
||||||
/>
|
/>
|
||||||
))}
|
)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user