import * as React from 'react'; import { FunctionComponent } from 'react'; import { CancerTreeSearchFilter } from 'shared/lib/query/textQueryUtils'; import { QueryUpdate, SearchClause, } from 'shared/components/query/filteredSearch/SearchClause'; import { QueryParser } from 'shared/lib/query/QueryParser'; import { FilterFormField } from 'shared/components/query/filteredSearch/field/FilterFormField'; export type FilteredSearchDropdownFormProps = { query: SearchClause[]; filterConfig: CancerTreeSearchFilter[]; onChange: (change: QueryUpdate) => void; parser: QueryParser; }; /** * Rendering of search filters as defined in query parser */ export const StudySearchControls: FunctionComponent = props => { return ( ); }; /** * Only render filters with multiple options * E.g. show reference genome filter when both hg19 and hg38 used */ function showFilter(filter: CancerTreeSearchFilter): boolean { return filter.form.options.length >= 2; }