Browse Source

Fix scroll to last scroll position after close modal search (#4057)

main
Alexey Pyltsyn 3 years ago
committed by GitHub
parent
commit
22f4595dac
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beta/src/components/Search.tsx

2
beta/src/components/Search.tsx

@ -42,7 +42,6 @@ const options = {
appId: siteConfig.algolia.appId,
apiKey: siteConfig.algolia.apiKey,
indexName: siteConfig.algolia.indexName,
rednerModal: true,
};
let DocSearchModal: any = null;
export const Search: React.FC<SearchProps> = ({
@ -120,6 +119,7 @@ export const Search: React.FC<SearchProps> = ({
createPortal(
<DocSearchModal
{...options}
initialScrollY={window.scrollY}
searchParameters={searchParameters}
onClose={onClose}
navigator={{

Loading…
Cancel
Save