-
Notifications
You must be signed in to change notification settings - Fork 56
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
combine order: bug? #259
Comments
dThanks for the feedback! The design is on purpose, but thanks for checking! The problem with tracking when @htl("""
<ul>
$((
@htl "<li>$(Child(CheckBox()))"
for _ in 1:10
))
""") Since this is an important feature of HypertextLiteral, i wanted to support it too. So with the current implementation, Child is tracked during a dummy render when you create a |
Sure, it's an important usecase to support, but is the current child order itself "by design" or just as a result of the current way to handle children?
This way, The concrete usecase I encountered this difference and was suprised by it, is when I create a 2d array of inputs, and then display them in row-major or column-major order. Would never guess that the output will be different depending on how already created inputs are displayed! |
I would say that it's by design just to have a simple API. Otherwise, we would track both orders and union them (and track duplicates). But in your case, it sounds like you should specify a name for each child, so that you get a named tuple. I added this option so that you don't have to depend on rendering order. For your matrix case, also check out the CSS flex styling options to change between grid orders. |
combine
returns values in the order of how widgets are displayed, while following the definition order would probably be more sensible:The text was updated successfully, but these errors were encountered: