Quellcode durchsuchen

81761 fix searchControl position

Mao vor 4 Jahren
Ursprung
Commit
7798e79876

+ 2 - 2
packages/app/src/components/SearchPage/SearchControl.tsx

@@ -47,7 +47,7 @@ const SearchControl: FC <Props> = (props: Props) => {
   };
 
   return (
-    <>
+    <div className="search-control-section">
       <div className="search-page-nav d-flex py-3 align-items-center">
         <div className="flex-grow-1 mx-4">
           <SearchPageFormTypeAny
@@ -96,7 +96,7 @@ const SearchControl: FC <Props> = (props: Props) => {
           </div>
         </div>
       </div>
-    </>
+    </div>
   );
 };
 

+ 1 - 1
packages/app/src/components/SearchPage/SearchPageLayout.tsx

@@ -26,7 +26,7 @@ const SearchPageLayout: FC<Props> = (props: Props) => {
       <div className="search-result d-flex" id="search-result">
         <div className="flex-grow-1 flex-basis-0 page-list border boder-gray search-result-list" id="search-result-list">
 
-          <nav><SearchControl></SearchControl></nav>
+          <SearchControl></SearchControl>
           <div className="d-flex align-items-start justify-content-between mt-1">
             <div className="search-result-meta">
               <span className="font-weight-light">{t('search_result.result_meta')} </span>

+ 6 - 0
packages/app/src/styles/_search.scss

@@ -1,3 +1,9 @@
+.search-control-section {
+  position: sticky;
+  top: 0;
+  z-index: 999;
+}
+
 .search-page-nav {
   background-color: #f7f7f7;
 }