These are chat archives for chandu0101/scalajs-react-components

Mar 2016
Stefan Ollinger
Mar 07 2016 17:00
There is a ref: MuiTextFieldM => Unit in MuiTextField. How is one supposed to store the MuiTextFieldM for later usage?
Omid Bakhshandeh
Mar 07 2016 18:35

Hi, I'm trying to compile the demo in my own sbt project:

libraryDependencies ++= Seq(
  "com.github.japgolly.scalajs-react" %%% "core" % "0.10.3",
  "com.github.japgolly.scalajs-react" %%% "extra" % "0.10.3",
  "com.github.chandu0101.scalajs-react-components" %%% "core" % "0.4.1"

getting this errors:

[error] E:\workspace\Calender\src\main\scala\demo\components\materialui\MuiProgressDemo.scala:20: type mismatch;
[error]  found   : Double(0.5)
[error]  required: scala.scalajs.js.UndefOr[Int]
[error]           MuiCircularProgress(mode = DeterminateIndeterminate.indeterminate, size = 0.5)(),
[error]                                                                                     ^
[error] E:\workspace\Calender\src\main\scala\demo\components\materialui\MuiProgressDemo.scala:22: type mismatch;
[error]  found   : Double(2.0)
[error]  required: scala.scalajs.js.UndefOr[Int]
[error]           MuiCircularProgress(mode = DeterminateIndeterminate.indeterminate, size = 2.0)(),
[error]                                                                                     ^
[error] two errors found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 23 s, completed Mar 7, 2016 10:30:49 AM
Omid Bakhshandeh
Mar 07 2016 22:01
I changed them to int and it's working ...

I am trying to reuse the demo
I changed the code of Homepage to:

package demo
package pages

import chandu0101.scalajs.react.components._
import chandu0101.scalajs.react.components.WithAsyncScript
import chandu0101.scalajs.react.components.materialui.ThemeInstaller
import chandu0101.scalajs.react.components.materialui.MuiRaisedButton
import demo.routes.AppRouter.Page
import japgolly.scalajs.react._
import japgolly.scalajs.react.extra.router.RouterCtl
import japgolly.scalajs.react.vdom.prefix_<^._

import chandu0101.scalajs.react.components.Implicits._

object HomePage {

  class Backend(t: BackendScope[RouterCtl[Page],_]) {

    def render(P: RouterCtl[Page]) = {
          MuiRaisedButton(label = "Default")()

  val component = ReactComponentB[RouterCtl[Page]]("homepage")

  def apply(ctrl: RouterCtl[Page]) = component(ctrl)


but when I add the MuiRaised.... I get this in browser: Uncaught TypeError: Cannot read property 'RaisedButton' of undefined
what I am missing?