From bc7cf6e01d396553e9cc39e10440d64c9fce2b2f Mon Sep 17 00:00:00 2001 From: Rodrigo Antinarelli Date: Mon, 16 Mar 2020 12:34:01 -0300 Subject: [PATCH] fix sticky elements --- platform/ui/src/views/StudyList/StudyList.js | 9 +- .../src/views/StudyList/components/Header.js | 2 +- .../StudyList/components/StudyListFilter.js | 190 ++++++++++-------- 3 files changed, 104 insertions(+), 97 deletions(-) diff --git a/platform/ui/src/views/StudyList/StudyList.js b/platform/ui/src/views/StudyList/StudyList.js index 54aa36364..652fb52ec 100644 --- a/platform/ui/src/views/StudyList/StudyList.js +++ b/platform/ui/src/views/StudyList/StudyList.js @@ -69,13 +69,8 @@ const StudyList = ({ studies, perPage }) => { 'h-screen': isEmptyStudies, })} > -
-
- -
+
+ +
{appLogo}
{children}
diff --git a/platform/ui/src/views/StudyList/components/StudyListFilter.js b/platform/ui/src/views/StudyList/components/StudyListFilter.js index c7682a1ef..5de435627 100644 --- a/platform/ui/src/views/StudyList/components/StudyListFilter.js +++ b/platform/ui/src/views/StudyList/components/StudyListFilter.js @@ -124,103 +124,115 @@ const StudyListFilter = ({ }; return ( -
-
-
-
-
- - Study List - -
- + Study List + +
+ +
+
+
+ {isFiltering() && ( + + )} + + {numOfStudies > 100 ? '>100' : numOfStudies} + + + Studies +
-
- {isFiltering() && ( - - )} - - {numOfStudies > 100 ? '>100' : numOfStudies} - - - Studies - -
-
-
- {filtersMeta.map( - ({ name, displayName, inputType, isSortable, gridCol }) => { - return ( -
- 0 - } - isBeingSorted={sortBy === name} - sortDirection={sortDirection} - onLabelClick={() => handleFilterLabelClick(name)} - inputType={inputType} - > - {inputType !== 'none' && ( - - handleFilterValueChange(event, name) - } - /> - )} - -
- ); - } - )}
- {numOfStudies > 100 && ( -
-
-

- Filter list to 100 studies or less to enable sorting -

+
+
+
+
+ {filtersMeta.map( + ({ name, displayName, inputType, isSortable, gridCol }) => { + return ( +
+ 0 + } + isBeingSorted={sortBy === name} + sortDirection={sortDirection} + onLabelClick={() => handleFilterLabelClick(name)} + inputType={inputType} + > + {inputType !== 'none' && ( + + handleFilterValueChange(event, name) + } + /> + )} + +
+ ); + } + )} +
- )} -
+ {numOfStudies > 100 && ( +
+
+

+ Filter list to 100 studies or less to enable sorting +

+
+
+ )} +
+ ); };