diff --git a/pages/app-layout/with-table-collection-select-filter.page.tsx b/pages/app-layout/with-table-collection-select-filter.page.tsx index 964204d1b3..b85f548fc7 100644 --- a/pages/app-layout/with-table-collection-select-filter.page.tsx +++ b/pages/app-layout/with-table-collection-select-filter.page.tsx @@ -45,6 +45,8 @@ export default function () { const [usePropertyFilter, setUsePropertyFilter] = useState(true); const [customControl, setCustomControl] = useState(true); const [customAction, setCustomAction] = useState(true); + const [matches, setMatches] = useState(false); + const [textfilter, setTextfilter] = useState(''); const [query, setQuery] = useState({ operation: 'and', tokens: [] }); const { items, actions, paginationProps, propertyFilterProps } = useCollection(allItems, { @@ -99,6 +101,9 @@ export default function () { setCustomAction(e.detail.checked)}> Custom action + setMatches(e.detail.checked)}> + Show match count + } > @@ -127,13 +132,14 @@ export default function () { filteringProperties={filteringProperties} customControl={customControl && } additionalActions={customAction && } + countText={matches ? '11 matches' : undefined} /> ) : ( {}} + value={textfilter} + onChange={e => setTextfilter(e.detail.value)} placeholder="Find instances" clearAriaLabel="clear" /> @@ -163,6 +169,7 @@ export default function () { /> + {matches && !usePropertyFilter && 11 matches} } columnDefinitions={columnDefinitions.slice(0, 7)}