Skip to content

Commit

Permalink
fix(ui): arrow click position update (#5016)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamThakre authored May 27, 2022
1 parent 26c0acf commit 05310e4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions datahub-web-react/src/app/search/SearchFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Title = styled.div`
margin-bottom: 10px;
display: flex;
justify-content: space-between;
cursor: pointer;
`;

const CheckBox = styled(Checkbox)`
Expand Down Expand Up @@ -57,15 +58,12 @@ export const SearchFilter = ({ facet, selectedFilters, onFilterSelect, defaultDi

return (
<SearchFilterWrapper key={facet.field}>
<Title>
<Title onClick={() => setAreFiltersVisible((prevState) => !prevState)}>
{facet?.displayName}
{areFiltersVisible ? (
<StyledUpOutlined onClick={() => setAreFiltersVisible(false)} />
<StyledUpOutlined />
) : (
<StyledDownOutlined
data-testid={`expand-facet-${facet.field}`}
onClick={() => setAreFiltersVisible(true)}
/>
<StyledDownOutlined data-testid={`expand-facet-${facet.field}`} />
)}
</Title>
{areFiltersVisible && (
Expand Down

0 comments on commit 05310e4

Please sign in to comment.