RelatedViewModelField
Sourceimport { RelatedViewModelField } from "@prestojs/viewmodel";
RelatedViewModelField<TargetViewModelT,SourceFieldNameT = string>
Constructor
Params:
| Parameter | Type | Description | |
|---|---|---|---|
| * | props An object with the properties below | ||
| props.asyncChoices | AsyncChoicesInterface | ||
| props.blank | boolean | ||
| props.blankAsNull | boolean | ||
| props.cache | ViewModelCache | ||
| props.choices | Map|[SingleValueT, string][] | ||
| props.defaultValue | null|InstanceType| | ||
| props.formatterProps | Record | ||
| props.helpText | string | ||
| props.label | string | ||
| props.readOnly | boolean | ||
| * | props.sourceFieldName | SourceFieldNameT | |
| * | props.to | |TargetViewModelT | |
| props.widgetProps | Record | ||
| props.writeOnly | boolean | ||
Methods
Returns:Field
Params:
| Parameter | Type | Description | |
|---|---|---|---|
| * | value1 | InstanceType | |
| * | value2 | InstanceType |
Returns:boolean