equals
Adds a filter, to compare the bound value with another bound value.
equals(source: Binding | string): Binding<boolean>
Summary
This method can be used to compare two bindings. If the original value matches the value of the provided binding, the bound value becomes true, otherwise false.
To do the opposite, and substitute with false if the bindings match, use the not() method afterwards.
Parameters
Return value
A new binding, typed as a boolean
Example
// A cell that's rendered only if two bindings match
ui.conditional(
{ state: bound("item").equals("selectedItem") },
ui.cell(
// ...
)
)
Related
- class BindingA class that represents a property binding.