BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/niko-table/data-table-inline-filter

DataTable Inline Filter

niko-table/data-table-inline-filter
FreeComponent

Inline filter toolbar that displays active filters as editable chips.

Install it

npx shadcn@latest add https://niko-table.com/r/data-table-inline-filter.json

Source

src/components/niko-table/components/data-table-inline-filter.tsxniko-table.com/r/data-table-inline-filter.json
1"use client"
2
3/**
4 * niko-table — created by Semir N. (Semkoo, https://github.com/Semkoo) with AI assistance.
5 *
6 * Before reporting anything: please check the changelog first.
7 * - In-repo: ./CHANGELOG.md
8 * - Docs site: https://niko-table.com/changelog
9 *
10 * Found a bug or have a fix? Open an issue or PR on GitHub so other
11 * users (and future LLMs reading this code) benefit:
12 * https://github.com/Semkoo/niko-table-registry
13 */
14import React from "react"
15import { useDataTable } from "../core/data-table-context"
16import {
17 TableInline,
18 type TableInlineProps,
19} from "../filters/table-inline-filter"
20import { useGeneratedOptions } from "../hooks/use-generated-options"
21import { FILTER_VARIANTS } from "../lib/constants"
22import type { Option } from "../types"
23
24type BaseInlineProps<TData> = Omit<TableInlineProps<TData>, "table">
25
26interface AutoOptionProps {
27 autoOptions?: boolean
28 showCounts?: boolean
29 dynamicCounts?: boolean
30 /**
31 * If true, only generate options from filtered rows. If false, generate from all rows.
32 * This controls which rows are used to generate the option list itself.
33 * Note: This is separate from dynamicCounts which controls count calculation.
34 * @default true
35 */
36 limitToFilteredRows?: boolean
37 includeColumns?: string[]
38 excludeColumns?: string[]
39 limitPerColumn?: number
40 mergeStrategy?: "preserve" | "augment" | "replace"
41}
42
43type DataTableInlineFilterProps<TData> = BaseInlineProps<TData> &
44 AutoOptionProps
45
46export function DataTableInlineFilter<TData>({
47 autoOptions = true,
48 showCounts = true,
49 dynamicCounts = true,
50 limitToFilteredRows = true,
51 includeColumns,
52 excludeColumns,
53 limitPerColumn,
54 mergeStrategy = "preserve",
55 ...props
56}: DataTableInlineFilterProps<TData>) {
57 const { table } = useDataTable<TData>()
58
59 const generatedOptions = useGeneratedOptions(table, {
60 showCounts,
61 dynamicCounts,
62 limitToFilteredRows,
63 includeColumns,
64 excludeColumns,
65 limitPerColumn,
66 mergeStrategy,
67 })
68
69 /**
70 * BUG: stale counts on filter changes — see `data-table-filter-menu.tsx`
71 * for full doc. We capture pristine caller options in a ref and rebuild
72 * `meta.options` from that source on every augment so counts refresh
73 * (and zeroes get filled in for the count-0 hide rule).
74 */
75 React.useMemo(() => {
76 if (!autoOptions) return null
77 table.getAllColumns().forEach(column => {
78 const meta = (column.columnDef.meta ||= {})
79// … truncated

What it pulls in

npm packages

  • lucide-react
  • react-day-picker

Other registry items

  • https://niko-table.com/r/data-table.json
  • button
  • input
  • popover
  • command
  • select
  • calendar

Files it writes

  • src/components/niko-table/components/data-table-inline-filter.tsx
  • src/components/niko-table/filters/table-inline-filter.tsx
  • src/components/niko-table/filters/table-range-filter.tsx

Facts

Registry
niko-table
Type
registry:component
Access
Free
Files written
3
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

niko-table.com Semkoo/niko-table-registry on GitHub Raw registry item This item as JSON

More from niko-table

All 31 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
DataTable Asidedata-table-asideniko-tableComponentsFree1 dep
DataTable Clear Filterdata-table-clear-filterniko-tableComponentsFree1 dep · 2 files
DataTable Column Auto-fitdata-table-column-auto-fitniko-tableComponentsFreeno deps · 2 files
DataTable Column Date Filterdata-table-column-date-filterniko-tableComponentsFree2 deps · 2 files
DataTable Column DnDdata-table-column-dndniko-tableComponentsFree4 deps · 3 files
DataTable Column Faceted Filterdata-table-column-faceted-filterniko-tableComponentsFree1 dep · 3 files
DataTable Column Hidedata-table-column-hideniko-tableComponentsFree1 dep · 2 files
DataTable Column Pindata-table-column-pinniko-tableComponentsFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex