CngxDgaFilterField
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>