Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(studies): SKFP-767 filter without footer #3835

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/uiKit/FilterList/CustomFilterContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type OwnProps = {
headerTooltip?: boolean;
noDataInputOption?: boolean;
intervalDecimal?: number;
filterWithFooter?: boolean;
};

const CustomFilterContainer = ({
Expand All @@ -40,6 +41,7 @@ const CustomFilterContainer = ({
headerTooltip,
noDataInputOption,
intervalDecimal,
filterWithFooter = true,
}: OwnProps) => {
const [isSearchVisible, setIsSearchVisible] = useState(false);
const [isOpen, setIsOpen] = useState(defaultOpen);
Expand Down Expand Up @@ -70,7 +72,7 @@ const CustomFilterContainer = ({
extendedMapping: found,
aggregation: aggregations,
rangeTypes: [],
filterFooter: true,
filterFooter: filterWithFooter,
headerTooltip,
dictionary: getFacetsDictionary(),
noDataInputOption,
Expand Down
3 changes: 3 additions & 0 deletions src/components/uiKit/FilterList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type OwnProps = {
queryBuilderId: string;
extendedMappingResults: IExtendedMappingResults;
filterInfo: FilterInfo;
filterWithFooter?: boolean;
filterMapper?: TCustomFilterMapper;
};

Expand All @@ -42,6 +43,7 @@ const FilterList = ({
queryBuilderId,
extendedMappingResults,
filterInfo,
filterWithFooter = true,
filterMapper,
}: OwnProps) => {
const [filtersOpen, setFiltersOpen] = useState<boolean | undefined>(isAllFacetOpen(filterInfo));
Expand Down Expand Up @@ -92,6 +94,7 @@ const FilterList = ({
? group.intervalDecimal[facet]
: undefined
}
filterWithFooter={filterWithFooter}
/>
) : (
<div key={i + ii} className={cx(styles.customFilterWrapper, styles.filter)}>
Expand Down
9 changes: 8 additions & 1 deletion src/views/Studies/components/SideBarFacet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ type OwnProps = {
className?: string;
extendedMappingResults: IExtendedMappingResults;
filterInfo: FilterInfo;
filterWithFooter?: boolean;
};

const SideBarFacet = ({ className, extendedMappingResults, filterInfo }: OwnProps) => {
const SideBarFacet = ({
className,
extendedMappingResults,
filterInfo,
filterWithFooter,
}: OwnProps) => {
const [collapsed, setCollapsed] = useState<boolean>(false);
const { loading } = extendedMappingResults;

Expand Down Expand Up @@ -48,6 +54,7 @@ const SideBarFacet = ({ className, extendedMappingResults, filterInfo }: OwnProp
queryBuilderId={STUDIES_REPO_QB_ID}
extendedMappingResults={extendedMappingResults}
filterInfo={filterInfo}
filterWithFooter={filterWithFooter}
/>
</div>
)}
Expand Down
6 changes: 5 additions & 1 deletion src/views/Studies/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ const Studies = () => {

return (
<div className={styles.studiesPage}>
<SideBarFacet extendedMappingResults={studiesMappingResults} filterInfo={filterInfo} />
<SideBarFacet
extendedMappingResults={studiesMappingResults}
filterInfo={filterInfo}
filterWithFooter={false}
/>
<ScrollContent id={SCROLL_WRAPPER_ID} className={styles.scrollContent}>
<PageContent defaultColumns={columns} extendedMappingResults={studiesMappingResults} />
</ScrollContent>
Expand Down