Web:Common:FilterInput: update selected items

This commit is contained in:
Timofey Boyko 2022-12-01 11:25:27 +03:00
parent 9230bf1a63
commit 58b57245e2
2 changed files with 3 additions and 1 deletions

View File

@ -177,7 +177,7 @@ const FilterInput = React.memo(
<SelectedItem
key={`${item.key}_${item.group}`}
propKey={item.key}
label={item.label}
label={item.selectedLabel ? item.selectedLabel : item.label}
group={item.group}
removeSelectedItem={removeSelectedItemAction}
/>

View File

@ -33,6 +33,8 @@ const StyledSelectedItem = styled.div`
StyledSelectedItem.defaultProps = { theme: Base };
const SelectedItem = ({ propKey, label, group, removeSelectedItem }) => {
if (!label) return <></>;
const onRemove = () => {
removeSelectedItem(propKey, label, group);
};