Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableView render change? #466

Open
turdparty opened this issue Jul 4, 2022 · 3 comments
Open

TableView render change? #466

turdparty opened this issue Jul 4, 2022 · 3 comments

Comments

@turdparty
Copy link
Contributor

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;
`

@ianharrigan
Copy link
Member

Yeah, i would have expected it to generate basic item renderers for the rest of the columns also - ill check it out.

Cheers,
Ian

@turdparty
Copy link
Contributor Author

Found it, it was commit bdf58f3
"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.

@ianharrigan ianharrigan reopened this Jul 5, 2022
@ianharrigan
Copy link
Member

Cool - nice find - lets leave this open, ill review the code and see why i thought it was so strange.

Cheers,
Ian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants