I have a tableview I set the datasource for. It binds up and you can edits the contents of rows.
It also populates the edits with what data was in the rows already.
I am trying to figure out what event to bind to to know a row was edited so I can mark the data as dirty for saving back to the server.
I have tried binding to UIEvent.CHANGE on the table and on the specific fields but that doesn’t appear to trigger. Any suggestions on where to look for this would be appreciated.
<tableview id="answersTable" width="100%" height="100%">
<header width="100%">
<column id="correct" text="Correct" width="80" />
<column id="answer" text="Answer" width="100%" />
<column id="deleteAnswer" text="" width="80" />
</header>
<item-renderer verticalAlign="center" >
<textfield id="answer" verticalAlign="center" width="100%"/>
</item-renderer>
<item-renderer verticalAlign="center" >
<checkbox id="correct" horizontalAlign="center"/>
</item-renderer>
<item-renderer verticalAlign="center">
<button id="deleteAnswer" width="100%" text="Delete"/>
</item-renderer>
<data>
</data>
</tableview>
@:bind(answersTable, UIEvent.CHANGE)
@:bind(answer, UIEvent.CHANGE)
private function tableChanged(q){
trace("update detected ",q);
}
Neither of those binds trigger when I edit the table row value for question.
I am very new to HaxeUI so I am aware I may be missing something obvious.