Hi
I am porting a project from Vue to coconut, and I am trying to make it with the minimum changes, in the past I managed already to do this ```class TextBox extends coconut.ui.View {
@:controlled var model:String;
function render() {
return hxx('<input type="text" value={model} oninput={e->model=e.src.value} />');
}
}```
Which worked fine to emulate v-model behavior, I later changed the attribute name to vmodel, I would like to allow the hyphen too v-model
but whatever.
I am haveing now an issue, I want to allow textbox to use all attributes availible to input such as style class and whaever, and pass them over to the input, I tried to extend the html input class, aswell as to call input as a function (like we could in tink_hxx), but was unable to get it working.
I wouldn’t make send to fill up the page with all my blind attempts, I will post to to explain where I was heading, in general I would like to hear more on how the hxx magic is working.
@controlled public var vmodel:String="";
function render() {
return textarea({value:vmodel.toString(),oninput:e->vmodel=e.src.value},[]);
}
}
function vtextarea2(attributes:tink.domspec.Tags, children:Array<RenderResult>):View {
return hxx('<textarea {...attributes}>{...children}</textarea>');
}
Thank you