Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replaced clear button with reset filters button #2703

Merged
merged 7 commits into from
Dec 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@ export const Filters: React.FC = () => {
size="sm"
className="flex items-center h-8 gap-2 bg-background-subtle"
onClick={() => {
ogzhanolguncu marked this conversation as resolved.
Show resolved Hide resolved
setIdentifierVisible(false);
setIdentifier(null);
startTransition(() => {});
startTransition(() => {
setIdentifierVisible(false);
setSuccessVisible(false);
setSuccess(null);
setTimeRangeVisible(false);
setIdentifier(null);
setAfter(null);
setBefore(null);
});
}}
>
Clear
Reset Filters
<X className="w-4 h-4" />
</Button>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { notFound } from "next/navigation";
import { EmptyPlaceholder } from "@/components/dashboard/empty-placeholder";
import { Loading } from "@/components/dashboard/loading";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
Table,
TableBody,
Expand All @@ -16,7 +15,6 @@ import {
} from "@/components/ui/table";
import { clickhouse } from "@/lib/clickhouse";
import { Box, Check, X } from "lucide-react";
import Link from "next/link";
import { parseAsArrayOf, parseAsBoolean, parseAsIsoDateTime, parseAsString } from "nuqs/server";
import { Suspense } from "react";
import { Filters } from "./filter";
Expand Down Expand Up @@ -136,9 +134,6 @@ const AuditLogTable: React.FC<{
<EmptyPlaceholder.Description>
No events matched these filters, try changing them.{" "}
</EmptyPlaceholder.Description>
<Link href="/audit" prefetch>
<Button variant="secondary">Reset Filters</Button>
</Link>
</div>
) : (
<EmptyPlaceholder.Description>
Expand Down
Loading