RemoteDataSourceProps
Configuration properties for the remote data source. Extends the basic DataSourceProps with remote data operations capabilities.
Definition
Package:@progress/kendo-react-data-tools
Properties
creates?
Map<null | string | number | symbol, T>
Map of created items that need to be synced with the remote source.
data?
T[]
The current data array to be managed by the hook.
This represents the data items that are currently available in the data source.
If not provided, the defaultData will be used as the initial value.
defaultData?
T[]
The initial data array to be managed by the hook.
defaultFilter?
CompositeFilterDescriptor
The initial filter configuration.
defaultGroup?
GroupDescriptor[]
The initial grouping configuration.
defaultSkip?
number
The initial number of records to skip (for paging).
defaultSort?
SortDescriptor[]
The initial sorting configuration.
defaultTake?
number
The initial number of records to take per page.
defaultTotal?
number
The initial total number of records in the data source.
deletes?
Map<null | string | number | symbol, T>
Map of items marked for deletion that need to be synced with the remote source.
filter?
CompositeFilterDescriptor
The current filter configuration.
filterable?
boolean
Specifies whether filtering is enabled.
true
group?
GroupDescriptor[]
The current grouping configuration.
groupable?
boolean
Specifies whether grouping is enabled.
true
pageable?
boolean
Specifies whether paging is enabled.
true
reads?
Map<null | string | number | symbol, T>
Map of original data items read from the remote source, indexed by ID.
schema
{ model: { id: string } } intersected with { data?: string | (data: any) => T[]; total?: string | (data: any) => number; errors?: string | (data: any) => any }
Schema configuration for parsing and mapping server responses. Extends the base DataSourceProps schema with additional properties for remote data.
serverFiltering?
boolean
Determines if filtering operations should be performed on the server. When true, filter parameters are sent to the server during read operations.
true
serverGrouping?
boolean
Determines if grouping operations should be performed on the server. When true, group parameters are sent to the server during read operations.
true
serverPaging?
boolean
Determines if paging operations should be performed on the server. When true, skip and take parameters are sent to the server during read operations.
true
serverSorting?
boolean
Determines if sorting operations should be performed on the server. When true, sort parameters are sent to the server during read operations.
true
skip?
number
The current number of records to skip (for paging).
sort?
SortDescriptor[]
The current sorting configuration.
sortable?
boolean
Specifies whether sorting is enabled.
true
take?
number
The current number of records to take per page.
total?
number
The total number of records in the data source.
transport?
{ create?: { url: string | (dataItem: T) => string; method?: string; contentType?: string; data?: { [key: string]: any }; parameterMap?: (data: T) => any; onSuccess?: (data: T) => void; onResponse?: (response: any) => null | T; onError?: (error: any) => void } | (options: { data: T }) => Promise<T>; read?: { url: string | () => string; method?: string; contentType?: string; data?: { [key: string]: any }; parameterMap?: (data: { filter?: CompositeFilterDescriptor; skip?: number; take?: number; sort?: SortDescriptor[]; group?: GroupDescriptor[] }) => any; onSuccess?: (data: T[]) => void; onResponse?: (response: any) => null | T; onError?: (error: any) => void } | (options: { filter?: CompositeFilterDescriptor; skip?: number; take?: number; sort?: SortDescriptor[]; group?: GroupDescriptor[]; onSuccess?: (data: T[]) => void; onResponse?: (response: any) => null | T; onError?: (error: any) => void }) => Promise<T[]>; update?: { url: string | (dataItem: T) => string; method?: string; contentType?: string; data?: { [key: string]: any }; parameterMap?: (data: T) => any; onSuccess?: (data: T) => void; onResponse?: (response: any) => null | T; onError?: (error: any) => void } | (options: { data: T }) => Promise<T>; delete?: { url: string | (dataItem: T) => string; method?: string; contentType?: string; data?: { [key: string]: any }; parameterMap?: (data: T) => any; onSuccess?: (data: T) => void; onResponse?: (response: any) => null | T; onError?: (error: any) => void } | (options: { data: T }) => Promise<T> }
Configuration for CRUD operations transport. Defines how data is sent to and received from the server.
updates?
Map<null | string | number | symbol, T>
Map of updated items that need to be synced with the remote source.