Repository navigation
Replies: 1 comment
|
I would separate the local input state from the shared data model. For text fields, updating the shared model on every keystroke can introduce unnecessary synchronization overhead, especially when updates are sent over a network. A practical approach is to keep the input responsive with local state and synchronize the shared model on blur or submit, depending on the interaction requirements. For controls where immediate feedback matters, such as checkboxes or toggles, synchronizing on change may make more sense. The important part is defining when changes become authoritative and how concurrent updates are handled. Does A2UI currently define a specific synchronization point for text input components, or is this intentionally left to the renderer implementation? |
Uh oh!
There was an error while loading. Please reload this page.
Send messages to the UI that create a surface with an interactive TextField component backed by a data model. The user then types into the text field. When and how should the data model be updated?
Possible solutions:
I saw this in the spec:
so perhaps the answer is #1. In that case the other UI elements such as check boxes and sliders should create dataModelUpdate messages with every interaction as well.
Or maybe the answer is that it doesn't matter to A2UI and the render can decide for itself what to do.
All reactions