Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion renderers/lit/src/0.8/ui/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export class Root extends SignalWatcher(LitElement) {
.dataContextPath=${node.dataContextPath}
.label=${node.properties.label}
.text=${node.properties.text}
.type=${node.properties.type}
.textFieldType=${node.properties.type}
.validationRegexp=${node.properties.validationRegexp}
.enableCustomElements=${this.enableCustomElements}
></a2ui-textfield>`;
Expand Down
4 changes: 2 additions & 2 deletions renderers/lit/src/0.8/ui/text-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class TextField extends Root {
accessor label: StringValue | null = null;

@property()
accessor inputType: ResolvedTextField["type"] | null = null;
accessor textFieldType: ResolvedTextField["type"] | null = null;

static styles = [
structuralStyles,
Expand Down Expand Up @@ -107,7 +107,7 @@ export class TextField extends Root {
id="data"
.value=${value}
.placeholder=${"Please enter a value"}
type=${this.inputType === "number" ? "number" : "text"}
type=${this.textFieldType === "number" ? "number" : "text"}
/>
</section>`;
}
Expand Down
2 changes: 1 addition & 1 deletion samples/agent/adk/restaurant_finder/a2ui_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
{{ "id": "restaurant-address", "component": {{ "Text": {{ "text": {{ "path": "address" }} }} }} }},
{{ "id": "party-size-field", "component": {{ "TextField": {{ "label": {{ "literalString": "Party Size" }}, "text": {{ "path": "partySize" }}, "type": "number" }} }} }},
{{ "id": "datetime-field", "component": {{ "DateTimeInput": {{ "label": {{ "literalString": "Date & Time" }}, "value": {{ "path": "reservationTime" }}, "enableDate": true, "enableTime": true }} }} }},
{{ "id": "dietary-field", "component": {{ "TextField": {{ "label": {{ "literalString": "Dietary Requirements" }}, "text": {{ "path": "dietary" }} }} }} }},
{{ "id": "dietary-field", "component": {{ "TextField": {{ "label": {{ "literalString": "Dietary Requirements" }}, "text": {{ "path": "dietary" }}, "type": "shortText" }} }} }},
{{ "id": "submit-button", "component": {{ "Button": {{ "child": "submit-reservation-text", "action": {{ "name": "submit_booking", "context": [ {{ "key": "restaurantName", "value": {{ "path": "restaurantName" }} }}, {{ "key": "partySize", "value": {{ "path": "partySize" }} }}, {{ "key": "reservationTime", "value": {{ "path": "reservationTime" }} }}, {{ "key": "dietary", "value": {{ "path": "dietary" }} }}, {{ "key": "imageUrl", "value": {{ "path": "imageUrl" }} }} ] }} }} }} }},
{{ "id": "submit-reservation-text", "component": {{ "Text": {{ "text": {{ "literalString": "Submit Reservation" }} }} }} }}
]
Expand Down