We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Event bindings do not seem to register on an element that also has a foreach binding. It does however work on child elements. For example:
<div class="wifi-select"> <div class="wifi-option" wifi-vm-foreach="$vm.networks" wifi-vm-event-bind="click::ssidUpdate($item.ssid)"> <div style="width: 32px" wifi-vm-content-bind="$vm.wifiIcons[$item.strength]"></div> <div wifi-vm-content-bind="$item.ssid"></div> <div wifi-vm-content-bind="$item.private ? '🔒' : '🔓'"></div> </div> </div>
The ssidUpdate event never gets fired since it is on the same element that is foreach bound.
ssidUpdate
Put the binding on a child element. For example:
<div class="wifi-select"> <div class="wifi-option" wifi-vm-foreach="$vm.networks"> <div wifi-vm-event-bind="click::ssidUpdate($item.ssid)"> <div style="width: 32px" wifi-vm-content-bind="$vm.wifiIcons[$item.strength]"></div> <div wifi-vm-content-bind="$item.ssid"></div> <div wifi-vm-content-bind="$item.private ? '🔒' : '🔓'"></div> </div> </div> </div>
The text was updated successfully, but these errors were encountered:
Olverine
No branches or pull requests
The problem
Event bindings do not seem to register on an element that also has a foreach binding. It does however work on child elements.
For example:
The
ssidUpdate
event never gets fired since it is on the same element that is foreach bound.Possible workaround
Put the binding on a child element.
For example:
The text was updated successfully, but these errors were encountered: