Skip to main content
cngx-src documentation

CngxDgaFilterField

ComponentOnPushNo encapsulationv0.1.0WCAG AA

projects/ui/data-grid-accordion/data-grid-filter-field.component.ts

Import#

import { CngxDgaFilterField } from '@cngx/ui/data-grid-accordion'

Description#

A ready-made filter row for a CngxDataGridAccordion: a full-width grid-column: 1 / -1 band with a visible <label> and a search input, so a consumer drops <cngx-dga-filter label="Filter invoices" /> instead of hand-styling a <div> around a bare <input cngxDgaFilter>.

It is a thin structural shell over the CngxDgaFilter brain, not a new behaviour: the directive still owns the debounce, the two-way filterTerm write, and the focused-caret guard. The shell adds only the chrome (span + padding via --cngx-dga-* tokens) and a real <label> whose for binds the input id, so the searchbox has a visible accessible name (WCAG 3.3.2) rather than an invisible aria-label alone. The label text is mirrored onto the directive's cngxDgaFilterLabel so the accessible name is the label, not the directive's 'Filter rows' default.

<cngx-data-grid-accordion>
  <cngx-dga-filter label="Filter invoices" placeholder="Customer or invoice number" />
  <cngx-dga-header>…</cngx-dga-header>
  <!-- rows -->
</cngx-data-grid-accordion>

https://cngxjs.github.io/cngx/examples/#/ui/data-grid-accordion/sortable-ledger

Metadata#

Relationships

Index#

Inputs#

debounce#
input()

Debounce in ms forwarded to the hosted cngxDgaFilter.

default 200
label#
input()

Visible label text; also drives the input's accessible name. English default.

default 'Filter'
placeholder#string | undefined
input()

Optional placeholder shown inside the input.

Instance Properties#

inputId#unknown
ProtectedReadonly

Stable id linking the visible <label for> to the input.

nextUid('cngx-dga-filter-')