scalajs-spa-tutorial
scalajs-spa-tutorial copied to clipboard
Modal breaks on scalajs-react 1.4
This tutorial is one of the few and better resources to pick up some scalajs. The modal, however, doesn't work when upgrading to scalajs-react 1.4.
Perhaps the whole project can be updated to latest versions of everything.
In Bootstrap.scala
you do
jQuery(scope.getDOMNode).modal(js.Dynamic.literal...
Upgrading to scalajs-react 1.4 is breaking because getDOMNode
now returns a ComponentDom.Mounted
rather than an Element
. I've tried doing jQuery(scope.getDOMNode.asElement())
, but when opening the modal the console reads
Bootstrap.scala:101 Uncaught TypeError: jsx$2 is not a function
at Bootstrap.scala:101
at $c_sjsr_AnonFunction0.apply__O (AnonFunctions.scala:22)
If you can fix it with a PR, that would be great! :)