AB Dynamic Field
Platform field renderer: picks and embeds the correct input widget from pg_data_type, field_type, entity, or field_widget config.
HTML tag: c-e5c953eafd3a04877969ba4dbe467d236
When to use
Section titled “When to use”- entity property field with auto widget
- schema-driven form cell
- unknown pg_data_type — let platform render
| Prop | Type | Default | Description |
|---|---|---|---|
pg_data_type | String | ||
field_type | String | ||
value | Object | [object Object] | |
label | String | ||
field_widget | Object | [object Object] | |
entity | String |
- Provide pg_data_type and/or field_type and/or entity; optional field_widget override object.
- value is Object — shape depends on resolved widget.
- Listen for value-changed from child widget (bubbles through).
- Prefer this in entity-driven forms instead of hard-coding ab-input/ab-select per column.
Events
Section titled “Events”| Event | Detail |
|---|---|
value-changed | Object |
Methods
Section titled “Methods”| Signature | Description |
|---|---|
setDefaultFieldWidget() |
What to avoid
Section titled “What to avoid”Do not manually nest ab-input when the platform already knows the field type — use ab-dynamic-field. Do not use for arbitrary static forms with known controls.
Example
Section titled “Example”<c-e5c953eafd3a04877969ba4dbe467d236 .pg_data_type=${col.pg_data_type} .field_type=${col.field_type__thing_id} .value=${record[col.property_id]} .label=${col.label} @value-changed=${onField}></c-e5c953eafd3a04877969ba4dbe467d236>