aboutsummaryrefslogtreecommitdiff
path: root/mavigator-cockpit/src/main/scala/mavigator/index/Util.scala
diff options
context:
space:
mode:
Diffstat (limited to 'mavigator-cockpit/src/main/scala/mavigator/index/Util.scala')
-rw-r--r--mavigator-cockpit/src/main/scala/mavigator/index/Util.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/mavigator-cockpit/src/main/scala/mavigator/index/Util.scala b/mavigator-cockpit/src/main/scala/mavigator/index/Util.scala
index 16f3d5d..2671f2f 100644
--- a/mavigator-cockpit/src/main/scala/mavigator/index/Util.scala
+++ b/mavigator-cockpit/src/main/scala/mavigator/index/Util.scala
@@ -13,7 +13,7 @@ import scala.util.Failure
import scalatags.JsDom.all._
object Util {
-
+
/**
* Copied from https://github.com/lihaoyi/workbench-example-app/blob/todomvc/src/main/scala/example/Framework.scala
*
@@ -22,13 +22,13 @@ object Util {
* the Obs onto the element itself so we have a reference to kill it when
* the element leaves the DOM (e.g. it gets deleted).
*/
- implicit def rxMod[T <: html.Element](r: Rx[HtmlTag]): Frag = {
+ implicit def rxMod(r: Rx[HtmlTag])(implicit owner: Ctx.Owner): Frag = {
def rSafe = r.toTry match {
case Success(v) => v.render
case Failure(e) => span(e.toString, backgroundColor := "red").render
}
var last = rSafe
- Obs(r, skipInitial = true) {
+ r.triggerLater{
val newLast = rSafe
last.parentElement.replaceChild(newLast, last)
last = newLast