Skip to content

utils/fieldMappings ​

Overview ​

Default mappings from DRF serializer field types to Vue field components and widget components.

Properties ​

choiceFieldMappings ​

Type: object

Source: client/lib/utils/fieldMappings.js:337

defaultFieldMappings ​

Type: object

Source: client/lib/utils/fieldMappings.js:31

filterFieldMapping ​

Field-to-component mappings for filter form fields, keyed by the filter type the server reports as a filter's typeFilter. Every type here also has value handling in FilterFieldMappings. ChoiceField, TypedChoiceField, and MultipleChoiceField render the choices listed in the filter metadata. The ModelChoice* and AllValues* types render WidgetModel, which fetches their choices from the filter choices endpoint.

Type: object

Source: client/lib/utils/fieldMappings.js:624

FilterFieldMappings ​

Per-filter-type value configuration: the empty/initial value a filter field starts from, whether it is a range (suffix pair) or an array filter, and how the list request encodes an array value. The live filter form (useFilterField) and URL→filter restoration (buildFilterFromQuery) both read it, so query values coerce the same way in each. filterFieldMapping holds the components for the same types. A custom filter type registers its entry here through mergeFilterFieldMapping, alongside its components.

Type: object

Source: client/lib/utils/fieldMappings.js:815

manyFieldMappings ​

Type: object

Source: client/lib/utils/fieldMappings.js:438

Methods ​

Types ​

FieldMappingEntry ​

FilterValueMapping ​

FilterFieldMappingInput ​

FilterFieldMappingInput = FieldMappingEntry & FilterValueMapping

Source ​

client/lib/utils/fieldMappings.js:1