CngxPaginatorPageSize
projects/ui/paginator/segments/paginator-page-size.component.ts
Import#
import { CngxPaginatorPageSize } from '@cngx/ui/paginator'
Description#
Items-per-page segment. A CngxListbox dropdown (never a native <select>,
never the forms select family - keeps @cngx/ui/paginator free of a
@cngx/forms dependency). [options] is data, not a feature toggle.
Picking a size routes through host.setPageSize, which resets to
page 0 (brain semantics). The selected size is derived from host.pageSize(),
so the panel selection and the trigger label never drift (Pillar 1).
Metadata#
Dependencies#
CNGX_PAGINATOR_HOSTinject()hostRelationships
Index#
Inputs#
readonly number[]Selectable page sizes. Pure data - the segment is content-agnostic. Leave
unbound (or empty) to fall back to the cascade default
(CNGX_PAGINATOR_CONFIG.pageSizeOptions, set app-wide via
withPaginatorPageSizeOptions); a non-empty binding wins over it.
[]Instance Properties#
Methods#
onSelect(value: unknown, popover: literal type, trigger: HTMLElement)Apply the picked page size and close the dropdown. Bound to the listbox's
activated output, not valueChange: activation fires on every pick, so
re-picking the CURRENT size still closes the panel (with valueChange
the unchanged model stays silent and the popover hangs open). Focus
returns to the trigger before hide() so the panel is never
aria-hidden while it still owns focus.
unknownliteral typeHTMLElement