Skip to content

Commit

Permalink
feat: show placeholder when search empty
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-buss committed Sep 6, 2022
1 parent 8b4e3ba commit 1c7c485
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion server/app/src/components/tables/Filters/FacetFilter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
Box,
Button,
Center,
CloseButton,
createStyles,
Group,
Expand Down Expand Up @@ -146,7 +147,10 @@ export default function FacetFilter({
variant="default"
color="brand"
disabled={filterValue.length === 0}
onClick={() => column.setFilterValue([])}>
onClick={() => {
column.setFilterValue([]);
setFilter("");
}}>
Reset
</Button>
)
Expand Down Expand Up @@ -190,6 +194,14 @@ export default function FacetFilter({
);
})}
</div>

{filteredOptions.length === 0 && (
<Center py="xs">
<Text color="dimmed" size="xs">
No Results
</Text>
</Center>
)}
</div>
</Popover.Dropdown>
</Popover>
Expand Down

0 comments on commit 1c7c485

Please sign in to comment.