Releases: canjs/can-stache-bindings
Releases · canjs/can-stache-bindings
speeds up tests by not group logging
v4.6.1 4.6.1
allow multiple one-directional updates
Issue: #499
Commit: 783688c
If a parent component renders a child like:
<child value:to="this.value">
And child updates parent
's value to "A"
And child renders:
<grand-child value:to="this.value">
Which causes an update to <child>
which causes another update to <parent>
, there would be 2 updates an the 2nd update was being prevented because of "cycles". We now allow 100 of these changes.
on:event simple setters
Adds simple setters for on:event
bindings like on:click="this.key = value"
Example:
<p>Priority: {{this.priority}}</p>
<button on:click="this.priority = 0">Urgent</button>
<button on:click="this.priority = 1">Critical</button>
<button on:click="this.priority = 10">Fahgettaboudit</button>
The key that is being set can be any key accessible by the scope. For example:
- Set values on the viewModel -
on:click="this.priority = 0"
. - Set values on a variable in the scope -
on:click="todo.priority = 0"
. - Set values on a scope value -
on:click="scope.element.value = 0"
The value that is being set must be represented by an expression that evaluates to a value. For example:
- primitives -
on:click="this.priority = 0"
- variables -
on:click="this.priority = todo.priority"
- functions -
on:click="this.priority = this.getPriority(todo)"
PR: #492
Make binding teardown account for documentElement being removed
improved binding update function names
v4.4.2 4.4.2
bindings.viewModel passes bindingState
passes the bindingState which includes information about the binding