mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
Fixes: Loading indicator on search screen load
Fixes: Unscrollable dropdowns with large datasets
This commit is contained in:
1 parent
da7fdfef0a
commit
a35a047cc2
2 files changed
+13
-5
No files matched your search
@@ -53,7 +53,10 @@ class Search extends React.Component<Props> {
|
||||
|
||||
componentDidMount() {
|
||||
this.handleTermChange();
|
||||
this.handleQueryChange();
|
||||
|
||||
if (this.props.location.search) {
|
||||
this.handleQueryChange();
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
|
||||
@@ -48,7 +48,6 @@ const FilterOptions = ({
|
||||
const Content = styled('div')`
|
||||
padding: 0 8px;
|
||||
width: 250px;
|
||||
max-height: 50vh;
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
@@ -78,14 +77,20 @@ const SearchFilter = props => {
|
||||
leftAlign
|
||||
>
|
||||
{({ closePortal }) => (
|
||||
<Content>
|
||||
<Scrollable>{props.children}</Scrollable>
|
||||
</Content>
|
||||
<MaxHeightScrollable>
|
||||
<Content>{props.children}</Content>
|
||||
</MaxHeightScrollable>
|
||||
)}
|
||||
</DropdownMenu>
|
||||
);
|
||||
};
|
||||
|
||||
const MaxHeightScrollable = styled(Scrollable)`
|
||||
max-height: 50vh;
|
||||
margin: -8px 0;
|
||||
padding: 8px 0;
|
||||
`;
|
||||
|
||||
const DropdownButton = styled(SearchFilter)`
|
||||
margin-right: 8px;
|
||||
`;
|
||||
|
||||
Reference in new issue
Block a user