API reference: @salmonui/query-builder
QueryOperatorinterface
import type { QueryOperator } from '@salmonui/query-builder';interface QueryOperator {
readonly name: string;
readonly label?: string | undefined;
readonly types?: readonly QueryFieldType[] | undefined;
readonly valueless?: boolean | undefined;
readonly list?: boolean | undefined;
readonly evaluate?: ((cellValue: unknown, filterValue: Json, ctx: {
readonly matchCase: boolean;
readonly ignoreAccents: boolean;
}) => boolean) | undefined;
}
A custom operator: labels and types here; evaluation through filterRows / the Data Grid filter module, SQL / Mongo through the converter hooks.
| Name | Signature | Description |
|---|---|---|
name | readonly name: string; | |
labeloptional | readonly label?: string | undefined; | |
typesoptional | readonly types?: readonly QueryFieldType[] | undefined; | Field types that offer it; default every type. |
valuelessoptional | readonly valueless?: boolean | undefined; | The operator takes no value. |
listoptional | readonly list?: boolean | undefined; | The value is a list (like |
evaluateoptional | readonly evaluate?: ((cellValue: unknown, filterValue: Json, ctx: {
readonly matchCase: boolean;
readonly ignoreAccents: boolean;
}) => boolean) | undefined; | Row test for |