How to use text input in IWSDK with UIKitML
I have tried using direct input element queries, but inputElement.properties.value or inputElement.value is always empty.
After a lot of debugging, I found that the input can be captured through direct signal access, like below:
const doc = this.panelDocument;
const textInput = doc.getElementById('checklist-text-input');
if (textInput && textInput.currentSignal) {
const newText = String(textInput.currentSignal.v ?? '').trim();
item.text = newText;
}
However, this seems like a hack, and I did not find any way to set the input value dynamically through any properties. I would like to know if there is a proper way to manipulate the input with UIKitML.
Ah found the solution it was to use
setProperties({ value: undefined, defaultValue: 'hello'});
getSignal('value').value