A2UI
A2UI copied to clipboard
Bug: TextField component in Lit renderer ignores "type" property (e.g. "number")
Describe the bug
The TextField component in the Lit renderer fails to respect the type property defined in the A2UI JSON payload. For example, when { "type": "number" } is sent, the input field still renders as a default text input (type="text"), allowing
non-numeric characters to be entered.
Screenshots
1. The JSON payload sends "type": "number":
2. But the UI still accepts non-numeric input (e.g., "2abc"):
Root Cause
There is a property name mismatch between the root renderer and the component:
root.tspasses the value to a property named.type.text-field.tsexpects a property namedinputType.
Because of this mismatch, the type value is never correctly set on the component instance, defaulting to text.
Fix
I have submitted a fix in PR #342 that aligns the property names to textFieldType to avoid conflicts and ensure correct binding.