A2UI icon indicating copy to clipboard operation
A2UI copied to clipboard

Bug: TextField component in Lit renderer ignores "type" property (e.g. "number")

Open SliverKeigo opened this issue 1 week ago • 0 comments

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": JSON Payload

2. But the UI still accepts non-numeric input (e.g., "2abc"): UI Bug

Root Cause

There is a property name mismatch between the root renderer and the component:

  • root.ts passes the value to a property named .type.
  • text-field.ts expects a property named inputType.

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.

SliverKeigo avatar Dec 18 '25 07:12 SliverKeigo