This component is used to automatically generate a UI for any field in a given BaseEntity object. The CodeGen tool will generate forms and form sections that use this component. This component automatically determines the type of the field and generates the appropriate UI element for it. It is possible to use other elements to render a field as desired in a custom form, think of this component as a nice "base" component you can use for many cases, and you can create custom components for field rendering/editing when needed.

Hierarchy (view full)

Implements

  • AfterViewInit

Constructors

Properties

FieldName: string = ''

The name of the field in the entity to be rendered.

LinkComponentType?: "Search" | "Dropdown" = 'Search'

The type of component to show, search is a user input field that searches for records, dropdown is a dropdown list of records. The default is 'search'. If the related entity has a small list of possible records, it is often desirable to show a dropdown list instead of a search box.

RecordLinked: boolean = false
RecordName?: string = ''

For users of this component, if you already know the name of the record we are linking to, provide it here to reduce DB overhead

RelatedEntityInfo: undefined | EntityInfo = undefined
RelatedEntityNameField: string = ''
RelatedEntityRecords: BaseEntity<unknown>[] = []
_SelectedRecord: undefined | BaseEntity<unknown> = undefined
_cache_userCanCreateNewLinkedRecord: null | boolean = null
cdr: ChangeDetectorRef
dropDownColumns: EntityFieldInfo[] = []
inputBox: ElementRef<any>
navigationService: NavigationService
record: BaseEntity<unknown>

The record object that contains the field to be rendered. This object should be an instance of BaseEntity or a derived class.

showMatchingRecords: boolean = false

Accessors

Methods