Filtering

<T> represents the object's shape coming from the data source. <R> represents the column data type: string, number, Date, or boolean.

Generics

<T> represents the object's shape coming from the data source.

<R> represents the column data type: string, number, Date, or boolean.

<V> represents the filter values.

DikeFilter

interface DikeFilter {
  logicalOperator: LogicalOperator,
  condition: string,
}

DikeTextFilter

interface DikeTextFilter extends DikeFilter {
  value?: string
}

DikeTextCaseFilter

interface DikeTextCaseFilter extends DikeTextFilter {
  caseSensitive: boolean
}

DikeNumericFilter

interface DikeNumericFilter extends DikeFilter {
  value1?: number,
  value2?: number
}

DikeDateFilter

interface DikeDateFilter extends DikeFilter {
  value1?: Date,
  value2?: Date
}

DikeBinaryFilter

interface DikeBinaryFilter extends DikeFilter {
  value?: string
}

DikeFilterable<T>

interface DikeFilterable<T extends object> {
  columnId: string,
  dataType: DikeColumnDataType,
  fieldName: string,
  headerText: string,

  caseSensitive?: boolean,
  filter?: DikeFilter[],
  customFilterConditions?: CustomFilterConditionInstance<T>
}

Condition<T, R, V>

interface Condition<T extends object, R extends string | number | Date | boolean, V> {
  text: string,
  value: string,
  eval: (entry: T, dataColumnDef?: DikeDataColumnDef<T, R>, values?: V) => boolean;
}

DikeSelectionModel

interface DikeSelectionModel {
  label: string,
  selected?: boolean
}

DikeBinarySelectionModel

interface DikeBinarySelectionModel extends DikeSelectionModel {
  value: string
}

DikeNumericSelectionModel

interface DikeNumericSelectionModel extends DikeSelectionModel {
  value: number
}

DikeTextSelectionModel

interface DikeTextSelectionModel extends DikeSelectionModel {
  value: string
}

Last updated