Skip to content

Commit 7f123cb

Browse files
authored
Merge pull request #20 from danilo-css/master
Update FilterDialog.tsx
2 parents b45e999 + e9de8c1 commit 7f123cb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

components/FilterDialog.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
} from "@/components/ui/collapsible";
3636
import { ChevronDown, ChevronUp } from "lucide-react";
3737
import { Separator } from "./ui/separator";
38+
import { useToast } from "@/hooks/use-toast";
3839

3940
export default function FilterDialog({
4041
table,
@@ -43,6 +44,7 @@ export default function FilterDialog({
4344
table: string;
4445
field: string;
4546
}) {
47+
const { toast } = useToast();
4648
const { db, runQuery } = useDuckDBStore();
4749
const { filters, addFilter } = usePivotStore();
4850
const [loading, setLoading] = useState(false);
@@ -107,6 +109,10 @@ export default function FilterDialog({
107109

108110
const handleSubmit = () => {
109111
addFilter(table, field, selectedValues);
112+
toast({
113+
title: "Filter Applied",
114+
description: `Successfully applied filter for ${field}`,
115+
});
110116
};
111117

112118
const clearAll = () => {
@@ -234,16 +240,15 @@ export default function FilterDialog({
234240
<CollapsibleContent className="mt-2">
235241
<ul className="space-y-1">
236242
{selectedValues.map((value, index) => (
237-
<>
243+
<div key={index}>
238244
<Separator orientation="horizontal" />
239245
<li
240-
key={index}
241246
className="text-white px-2 py-1 w-full text-ellipsis break-all"
242247
title={value}
243248
>
244249
{value}
245250
</li>
246-
</>
251+
</div>
247252
))}
248253
</ul>
249254
</CollapsibleContent>

0 commit comments

Comments
 (0)