Use stringify version for options in searchOptions component
This commit is contained in:
parent
ddae2e8ac5
commit
8d21acf64c
1 changed files with 4 additions and 2 deletions
|
@ -14,12 +14,14 @@ type Props = {
|
|||
|
||||
const SearchOptions = (props: Props) => {
|
||||
const { options, setSearchOption, expanded, toggleSearchExpanded } = props;
|
||||
const stringifiedOptions = JSON.stringify(options);
|
||||
const resultCount = options[SEARCH_OPTIONS.RESULT_COUNT];
|
||||
|
||||
const isFilteringByChannel = useMemo(() => {
|
||||
const claimType = String(options[SEARCH_OPTIONS.CLAIM_TYPE] || '');
|
||||
const jsonOptions = JSON.parse(stringifiedOptions);
|
||||
const claimType = String(jsonOptions[SEARCH_OPTIONS.CLAIM_TYPE] || '');
|
||||
return claimType.includes(SEARCH_OPTIONS.INCLUDE_CHANNELS);
|
||||
}, [options]);
|
||||
}, [stringifiedOptions]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue