FilterSchemaContext
Defined in: filter/src/hooks/use-filter-schema-context.tsx:13
Extends
Section titled “Extends”Readonly<Required<BasicFilterSphereInput<Data>>>
Type Parameters
Section titled “Type Parameters”Data = unknown
Properties
Section titled “Properties”fieldDeepLimit
Section titled “fieldDeepLimit”
readonlyfieldDeepLimit:number
Defined in: filter/src/types.ts:30
The maximum depth of searching for filter fields.
Default
Section titled “Default”1Inherited from
Section titled “Inherited from”FilterSphereInput.fieldDeepLimit
filterableFields
Section titled “filterableFields”
readonlyfilterableFields:FilterField[]
Defined in: filter/src/hooks/use-filter-schema-context.tsx:16
filterFnList
Section titled “filterFnList”
readonlyfilterFnList:FnSchema[]
Defined in: filter/src/types.ts:18
The list of filter functions schema.
If not provided, the presetFilter will be used.
Inherited from
Section titled “Inherited from”FilterSphereInput.filterFnList
filterRule
Section titled “filterRule”
readonlyfilterRule:FilterGroup
Defined in: filter/src/hooks/use-filter-schema-context.tsx:15
getLocaleText()
Section titled “getLocaleText()”
readonlygetLocaleText: (key) =>string
Defined in: filter/src/types.ts:53
Returns the translation for the key.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Readonly.getLocaleText
mapFieldName()
Section titled “mapFieldName()”
readonlymapFieldName: (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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Readonly.mapFieldName
mapFilterName()
Section titled “mapFilterName()”
readonlymapFilterName: (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.
Parameters
Section titled “Parameters”filterSchema
Section titled “filterSchema”Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”Readonly.mapFilterName
onRuleChange()?
Section titled “onRuleChange()?”
readonlyoptionalonRuleChange: (rule) =>void
Defined in: filter/src/hooks/use-filter-schema-context.tsx:17
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
schema
Section titled “schema”
readonlyschema:$ZodType<Data>
Defined in: filter/src/types.ts:8
The schema of the data to be filtered.
Inherited from
Section titled “Inherited from”Readonly.schema