IDateFiltersCustomizer
Set of functions you can use to customize how date filters are rendered.
export interface IDateFiltersCustomizer
Methods
Method | Description |
|---|---|
Register a provider for React components to render date filters. | |
(ALPHA) Register a provider for React components to render date filters of any type, including the absolute date filter with granularity. |
Method details
IDateFiltersCustomizer.withCustomProvider()method
Register a provider for React components to render date filters.
withCustomProvider(provider: OptionalDateFilterComponentProvider): IDateFiltersCustomizer;
Parameters
Parameter | Type | Description |
|---|---|---|
provider | provider to register |
Returns
self, for call chaining sakes
Remarks
A provider takes the date filter as input and is expected to return a React component that should be used to render that filter.
If the provider returns undefined then:
- if there are other providers registered, they will be called to see if they can provide a component to render the date filter - if there are no other providers registered, the default, built-in component will be used.
You may register multiple providers. They will be evaluated in the order you register them.
IDateFiltersCustomizer.withCustomProviderOfAnyType()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Register a provider for React components to render date filters of any type, including the absolute date filter with granularity.
withCustomProviderOfAnyType(provider: OptionalDateFilterOfAnyTypeComponentProvider): IDateFiltersCustomizer;
Parameters
Parameter | Type | Description |
|---|---|---|
provider | provider to register |
Returns
self, for call chaining sakes
Remarks
Providers registered by this method and by IDateFiltersCustomizer.withCustomProvider() form one chain evaluated in the order you register them. A provider registered by IDateFiltersCustomizer.withCustomProvider() is skipped for an absolute date filter with granularity.