Skip to content

FilterSchemaContext

Defined in: filter/src/hooks/use-filter-schema-context.tsx:13

Data = unknown

readonly fieldDeepLimit: number

Defined in: filter/src/types.ts:30

The maximum depth of searching for filter fields.

1

FilterSphereInput.fieldDeepLimit


readonly filterableFields: FilterField[]

Defined in: filter/src/hooks/use-filter-schema-context.tsx:16


readonly filterFnList: FnSchema[]

Defined in: filter/src/types.ts:18

The list of filter functions schema.

If not provided, the presetFilter will be used.

FilterSphereInput.filterFnList


readonly filterRule: FilterGroup

Defined in: filter/src/hooks/use-filter-schema-context.tsx:15


readonly getLocaleText: (key) => string

Defined in: filter/src/types.ts:53

Returns the translation for the key.

string

string

Readonly.getLocaleText


readonly mapFieldName: (field) => string

Defined in: filter/src/types.ts:38

Map the filter field to the field name.

For example, if the field path is user.name, you can map it to Name.

If not provided, the default map will use the fieldSchema.description or the field path as the name.

FilterField

string

Readonly.mapFieldName


readonly mapFilterName: (filterSchema, field) => string

Defined in: filter/src/types.ts:46

Map the filter fn schema to the filter label.

For example, if the filter name is eq, you can map it to Equal.

If not provided, the default map will use the filter name as the label.

StandardFnSchema

FilterField

string

Readonly.mapFilterName


readonly optional onRuleChange: (rule) => void

Defined in: filter/src/hooks/use-filter-schema-context.tsx:17

FilterGroup

void


readonly schema: $ZodType<Data>

Defined in: filter/src/types.ts:8

The schema of the data to be filtered.

Readonly.schema