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
I've recently encountered a phenomenon where binding an array of strings (ie. std::vector<Rml::String>) that may contain empty ones to a dropdown list using data-for results in the iterator name not being substituted in case of the empty ones.
The definition of the dropdown list looks something like this (the data variables are deliberately self-explanatory):
<select data-value="current_selection_index">
<option data-for="array_of_strings" data-value="it_index">{{ it }}</option>
</select>
When rendered, the result is along the lines of the following:
When the list contains only an empty string, then the following warnings are triggered:
Could not find variable name 'it' in data model.
Error in data expression at 4. Could not find data variable with name 'it'.
" it "
^
Could not add data-text view to element: #text < selectvalue < select < body < #root#test.rml
Can you also confirm this issue? I've spent some time debugging the code, but I found the data binding logic quite complex overall without being in knowledge of its basic principles.
The text was updated successfully, but these errors were encountered:
Thanks! This was a bug indeed. Does not seem to have anything to do with the select/option/data-for in particular, just data text views not working properly when initialized with empty strings.
Hello,
I've recently encountered a phenomenon where binding an array of strings (ie.
std::vector<Rml::String>
) that may contain empty ones to a dropdown list usingdata-for
results in the iterator name not being substituted in case of the empty ones.The definition of the dropdown list looks something like this (the data variables are deliberately self-explanatory):
When rendered, the result is along the lines of the following:
When the list contains only an empty string, then the following warnings are triggered:
Can you also confirm this issue? I've spent some time debugging the code, but I found the data binding logic quite complex overall without being in knowledge of its basic principles.
The text was updated successfully, but these errors were encountered: