data-table-faceted-filter.tsx — ui Source File
Architecture documentation for data-table-faceted-filter.tsx, a tsx file in the ui codebase. 9 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 471f9f35_04a7_990e_a2e9_2cfc2aff613c["data-table-faceted-filter.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 eff11612_0b61_f7f9_e13e_9117a7062bb3["react-table"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> eff11612_0b61_f7f9_e13e_9117a7062bb3 d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 4c79c55d_d834_3cdd_ce17_cc4f4eb47d55["badge"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> 4c79c55d_d834_3cdd_ce17_cc4f4eb47d55 57e86e45_ac6e_7278_be08_9092724e8401["button"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> 57e86e45_ac6e_7278_be08_9092724e8401 ea5fe791_bf71_2e59_8da4_433dcd06ee7b["command"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> ea5fe791_bf71_2e59_8da4_433dcd06ee7b 64a3481c_a85b_fe79_409a_cb7f3f4bb871["popover"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> 64a3481c_a85b_fe79_409a_cb7f3f4bb871 b2c60dee_4ede_8485_a6b4_91c999cdc69f["separator"] 471f9f35_04a7_990e_a2e9_2cfc2aff613c --> b2c60dee_4ede_8485_a6b4_91c999cdc69f 3f48c144_ad77_88d6_d116_724634f2678d["data-table-toolbar.tsx"] 3f48c144_ad77_88d6_d116_724634f2678d --> 471f9f35_04a7_990e_a2e9_2cfc2aff613c style 471f9f35_04a7_990e_a2e9_2cfc2aff613c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import { type Column } from "@tanstack/react-table"
import { Check, PlusCircle } from "lucide-react"
import { cn } from "@/lib/utils"
import { Badge } from "@/registry/new-york-v4/ui/badge"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
Command,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
} from "@/registry/new-york-v4/ui/command"
import {
Popover,
PopoverContent,
PopoverTrigger,
} from "@/registry/new-york-v4/ui/popover"
import { Separator } from "@/registry/new-york-v4/ui/separator"
interface DataTableFacetedFilterProps<TData, TValue> {
column?: Column<TData, TValue>
title?: string
options: {
label: string
value: string
icon?: React.ComponentType<{ className?: string }>
}[]
}
export function DataTableFacetedFilter<TData, TValue>({
column,
title,
options,
}: DataTableFacetedFilterProps<TData, TValue>) {
const facets = column?.getFacetedUniqueValues()
const selectedValues = new Set(column?.getFilterValue() as string[])
return (
<Popover>
<PopoverTrigger asChild>
<Button variant="outline" size="sm" className="h-8 border-dashed">
<PlusCircle />
{title}
{selectedValues?.size > 0 && (
<>
<Separator orientation="vertical" className="mx-2 h-4" />
<Badge
variant="secondary"
className="rounded-sm px-1 font-normal lg:hidden"
>
{selectedValues.size}
</Badge>
<div className="hidden gap-1 lg:flex">
{selectedValues.size > 2 ? (
<Badge
variant="secondary"
// ... (88 more lines)
Domain
Subdomains
Functions
Dependencies
- badge
- button
- command
- lucide-react
- popover
- react
- react-table
- separator
- utils
Source
Frequently Asked Questions
What does data-table-faceted-filter.tsx do?
data-table-faceted-filter.tsx is a source file in the ui codebase, written in tsx. It belongs to the ApplicationExhibition domain, TaskManagement subdomain.
What functions are defined in data-table-faceted-filter.tsx?
data-table-faceted-filter.tsx defines 1 function(s): DataTableFacetedFilter.
What does data-table-faceted-filter.tsx depend on?
data-table-faceted-filter.tsx imports 9 module(s): badge, button, command, lucide-react, popover, react, react-table, separator, and 1 more.
What files import data-table-faceted-filter.tsx?
data-table-faceted-filter.tsx is imported by 1 file(s): data-table-toolbar.tsx.
Where is data-table-faceted-filter.tsx in the architecture?
data-table-faceted-filter.tsx is located at apps/v4/app/(app)/examples/tasks/components/data-table-faceted-filter.tsx (domain: ApplicationExhibition, subdomain: TaskManagement, directory: apps/v4/app/(app)/examples/tasks/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free