CompositeKeySetter
com.raquo.laminar.modifiers.CompositeKeySetter
class CompositeKeySetter[K <: Key, -El <: Base](val key: CompositeKey[K, El], val itemsToAdd: List[String]) extends Setter[El]
This is like KeySetter, but for composite attributes like cls
and role
.
CompositeKeySetter can not be a subtype of KeySetter because we can not implement val value
– the actual value to be set is dynamic, depending on the current value of the element's composite attribute.
Also, if you call cls := "class2"
after calling cls := "class1"
, you end up with two classes instead of just "class2", which is different fro KeySetter semantics.
Note: for dynamic subscriptions (<--), we use KeyUpdater for all keys including composite attributes.
Value parameters
- itemsToAdd
-
Note: must be normalized (no empty strings; one value per item)
Attributes
- Graph
-
- Supertypes
Members list
In this article