Skip to main content
cngx-src documentation

CngxSmartDataSourceOptions

Interface

projects/common/data/data-source/smart-data-source.ts

Referenced by#

Import#

import { CngxSmartDataSourceOptions } from '@cngx/common/data'

Description#

Optional customization for CngxSmartDataSource.

Index#

Instance Properties#

filter#function
Optional

Same as sort, for the CngxFilter atom.

paginate#function
Optional

Same as sort, for the CngxPaginate atom.

searchFn#function
Optional

Custom full-text search function. Receives an item and the current search term; return true to keep the item. Defaults to a case-insensitive match across all primitive-valued properties.

Optional

Resolve the CngxSort atom explicitly instead of relying on injection. A thunk, not an instance, so a viewChild that is undefined on the first pass resolves on a later read. A thunk result takes precedence over an injected instance whenever it yields one; on undefined / null the source falls back to the injected atom - so with both present, the injected atom drives the frames before the thunk's target mounts, and the thunk cannot express "use none". Use for atoms hosted below this source's injector, e.g. { sort: () => this.grid()?.sort } against a CngxDataGridAccordion.

sortFn#function
Optional

Custom sort comparator. Receives two items, the active field key, and direction. Defaults to a locale-aware string comparison.