Closed vsuharnikov closed 9 years ago
How to reproduce the problem:
val rx: Var[Boolean] = true div( cls := "outer", switch( rx map { if (_) span(cls := "inner-1-true") else span(cls := "inner-1-false") } ), span(cls := "inner-2") ) /* <div class="outer"> <span class="inner-1-true"></span> <span class="inner-2"></span> </div> */ // Later rx.pull(false) /* <div class="outer"> <span class="inner-2"></span> <span class="inner-1-false"></span> </div> */
Adding an outer element (for switch block) leads to adding unnecessary CSS-classes and styles.
We should add an empty element (in a position of the switch), and then replace it when the state changes.
How to reproduce the problem:
Adding an outer element (for switch block) leads to adding unnecessary CSS-classes and styles.
We should add an empty element (in a position of the switch), and then replace it when the state changes.