haxeui-core
haxeui-core copied to clipboard
TableView render change?
Since updating to the latest version of haxeui-core and haxeui-openfl my tableviews that have checkboxes per row no longer display any text for the other components. This is not due to "value"/"text" attributes.
I suspect the tableview would create labels automatically for all the columns in the header. Has this behavior changed?
It seems it no longer does this if it detects any itemrenderer already in place (like mine for the checkbox). Before, it would still generate all the labels for the rest of the row.
If I create a tableview in code and ignore anything renderer related, the tableview works fine and displays all text.
But the following case doesn't show the text:
XML:
<tableview id="tv"> <item-renderer> <checkbox id="cb"/> </item-renderer> </tableview>
Haxe: `var tv:TableView=customdialog.findComponent("tv", TableView, true); var header:Header = new Header(); var c:Column = new Column(); c.id = "cb"; c.text=" "; header.addComponent(c);
c = new Column(); c.id="nr"; c.text = Main.getTranslation("Column 2"); header.addComponent(c); tv.addComponent(header); //plus a lot of extra columns here
tv.dataSource.allowCallbacks=false; for (i in 0...3) { tv.dataSource.add({cb:true, nr:"row number "+(i+1)}); } tv.dataSource.allowCallbacks=true; `
Yeah, i would have expected it to generate basic item renderers for the rest of the columns also - ill check it out.
Cheers, Ian
Found it, it was commit bdf58f38404765a9633369306a8dc6114d23e0a8 "comment out strange tableview code (remove later if no issues reported)" on April 22.
That would seem to set the itemrenderers :)
I'd suggest reverting that change.
Cool - nice find - lets leave this open, ill review the code and see why i thought it was so strange.
Cheers, Ian