You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The twig block choice_widget_expanded is applying the label_attr to its primary label and to each of the children, which produces wierd results, especially when you're using inline-btn as the widget_type. Basically, I want to apply btn-default to the children of the form row but not have it apply to the main label of the row (this causes the label of the row to have a btn 'hover' effect, which is annoying). The HTML output below shows that it's doing it incorrectly.
I'm trying to figure out a way to fix this in the choice_widget_expanded block but I'm having trouble with the way the logic flows. If I figure it out I'll send a PR.
Actual rendered HTML (flawed):
Notice how btn btn-default is duplicated on each iteration and how btn-default is applied to the main label of the row?
Due to how the label_attr is used in the child loop of the choice_widget_expanded block it adds the attributes over and over. This is not a huge deal, The main problem is that the primary label of the form row uses the same label attr's of the children.
The twig block
choice_widget_expanded
is applying thelabel_attr
to its primary label and to each of the children, which produces wierd results, especially when you're usinginline-btn
as the widget_type. Basically, I want to applybtn-default
to the children of the form row but not have it apply to the main label of the row (this causes the label of the row to have a btn 'hover' effect, which is annoying). The HTML output below shows that it's doing it incorrectly.I'm trying to figure out a way to fix this in the
choice_widget_expanded
block but I'm having trouble with the way the logic flows. If I figure it out I'll send a PR.Actual rendered HTML (flawed):
Notice how
btn btn-default
is duplicated on each iteration and howbtn-default
is applied to the main label of the row?Due to how the
label_attr
is used in the child loop of thechoice_widget_expanded
block it adds the attributes over and over. This is not a huge deal, The main problem is that the primary label of the form row uses the same label attr's of the children.Code used to render the above snippet:
The text was updated successfully, but these errors were encountered: