The <dataset> component uses several props to control how data is processed:
ds-data (Array of Objects): The source data to operate on.ds-filter-fields (Object): Defines filtering rules. Keys are data properties; values are either a literal value or a predicate function (value, row) => boolean.ds-sortby (Array): Properties to sort by. Prefix a property with - for descending order (e.g., ['lastName']).ds-search-in (Array): Restricts search to specific properties. If empty, all properties are searched.ds-search-as (Object): Custom search logic. Keys are properties; values are predicate functions (value, searchString, rowData) => boolean.ds-sort-as (Object): Custom sort conversion. Keys are properties; values are functions that convert the value into a sortable format (e.g., converting an ISO string to a Date object).
// Example predicate for ds-filter-fields
startsWithD (value, row) {
return value.toLowerCase().startsWith('d')
}
// Example predicate for ds-search-as
searchAsEuroDate: function (value, searchString, rowData) {
const parts = searchString.split('.')
const isoDate = `${parts[2]}-${parts[1]}-${parts[0]}`
return isoDate === value
}
// Example converter for ds-sort-as
sortAsDate: function (isoDate) {
return new Date(isoDate)
}