Fixes: Loading indicator on search screen load
Fixes: Unscrollable dropdowns with large datasets
This commit is contained in:
@@ -53,7 +53,10 @@ class Search extends React.Component<Props> {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.handleTermChange();
|
this.handleTermChange();
|
||||||
this.handleQueryChange();
|
|
||||||
|
if (this.props.location.search) {
|
||||||
|
this.handleQueryChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ const FilterOptions = ({
|
|||||||
const Content = styled('div')`
|
const Content = styled('div')`
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
max-height: 50vh;
|
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -78,14 +77,20 @@ const SearchFilter = props => {
|
|||||||
leftAlign
|
leftAlign
|
||||||
>
|
>
|
||||||
{({ closePortal }) => (
|
{({ closePortal }) => (
|
||||||
<Content>
|
<MaxHeightScrollable>
|
||||||
<Scrollable>{props.children}</Scrollable>
|
<Content>{props.children}</Content>
|
||||||
</Content>
|
</MaxHeightScrollable>
|
||||||
)}
|
)}
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const MaxHeightScrollable = styled(Scrollable)`
|
||||||
|
max-height: 50vh;
|
||||||
|
margin: -8px 0;
|
||||||
|
padding: 8px 0;
|
||||||
|
`;
|
||||||
|
|
||||||
const DropdownButton = styled(SearchFilter)`
|
const DropdownButton = styled(SearchFilter)`
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user