ui: same filter keys for exclusion in sankey, fix meta cta
This commit is contained in:
parent
9492234ccc
commit
7da11341cf
2 changed files with 16 additions and 3 deletions
|
|
@ -36,6 +36,12 @@ function ExcludeFilters(props: Props) {
|
|||
<FilterItem
|
||||
hideIndex={true}
|
||||
filterIndex={index}
|
||||
allowedFilterKeys={[
|
||||
FilterKey.LOCATION,
|
||||
FilterKey.CLICK,
|
||||
FilterKey.INPUT,
|
||||
FilterKey.CUSTOM,
|
||||
]}
|
||||
filter={f}
|
||||
onUpdate={(f) => onUpdateFilter(index, f)}
|
||||
onRemoveFilter={() => onRemoveFilter(index)}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,14 @@ function FilterModal(props: Props) {
|
|||
allowedFilterKeys,
|
||||
mode
|
||||
);
|
||||
const hasNoMeta = !filterObj['Metadata'];
|
||||
const showMetaCTA = !filterObj['Metadata']
|
||||
&& (allowedFilterKeys?.length
|
||||
? allowedFilterKeys.includes(FilterKey.METADATA) : true)
|
||||
&& (excludeCategory?.length
|
||||
? !excludeCategory.includes(FilterCategory.METADATA) : true)
|
||||
&& (excludeFilterKeys?.length
|
||||
? !excludeFilterKeys.includes(FilterKey.METADATA) : true);
|
||||
|
||||
const { matchingCategories, matchingFilters } = getMatchingEntries(
|
||||
searchQuery,
|
||||
filterObj
|
||||
|
|
@ -274,7 +281,7 @@ function FilterModal(props: Props) {
|
|||
{key}
|
||||
</div>
|
||||
))}
|
||||
{hasNoMeta ? (
|
||||
{showMetaCTA ? (
|
||||
<div
|
||||
key={'META_CTA'}
|
||||
onClick={() => setCategory('META_CTA')}
|
||||
|
|
@ -324,7 +331,7 @@ function FilterModal(props: Props) {
|
|||
</div>
|
||||
))
|
||||
: null}
|
||||
{category === 'META_CTA' && hasNoMeta ? (
|
||||
{category === 'META_CTA' && showMetaCTA ? (
|
||||
<div
|
||||
style={{
|
||||
height: 300
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue