diff --git a/ui/component/searchOptions/view.jsx b/ui/component/searchOptions/view.jsx index 0b0090beb..67d12a7c8 100644 --- a/ui/component/searchOptions/view.jsx +++ b/ui/component/searchOptions/view.jsx @@ -1,7 +1,7 @@ // @flow import { SEARCH_OPTIONS } from 'constants/search'; import * as ICONS from 'constants/icons'; -import React from 'react'; +import React, { useMemo } from 'react'; import { Form, FormField } from 'component/common/form'; import Button from 'component/button'; @@ -16,6 +16,11 @@ const SearchOptions = (props: Props) => { const { options, setSearchOption, expanded, toggleSearchExpanded } = props; const resultCount = options[SEARCH_OPTIONS.RESULT_COUNT]; + const isFilteringByChannel = useMemo(() => { + const claimType = String(options[SEARCH_OPTIONS.CLAIM_TYPE] || ''); + return claimType.includes(SEARCH_OPTIONS.INCLUDE_CHANNELS); + }, [options]); + return (