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

9th
Mar 2016
Øyvind Raddum Berg
@oyvindberg
Mar 09 2016 20:50
@omidb that exact prop has been changed since the last release xD
also did you get it to work? like @dozed said you need the material-ui javascript available in the global javascript namespace. does the ajax call from WithAsyncScript really succeed?
@dozed those refs are the 'new style' react references - you are supposed to store the input parameter of the function in a local var
it's better than the old String version in some ways in that it hides some complexity - i find it a lot easier to use
but then vars suck
luckily it seems material-ui is trying to avoid references for the next version
Stefan Ollinger
@dozed
Mar 09 2016 22:57
@oyvindberg when using ReactS[S, A] it is not possible to store the reference in the state S. MuiButton(ref = (ref => scope.runState(ST.mod(_.buttonRef = ref))) when run in render leads to an infinite cycle
Currently I store it in a var, which isnt really good.
Øyvind Raddum Berg
@oyvindberg
Mar 09 2016 23:35
any idea why that leads to an infinite cycle? thats weird
i have only used it with a var in my backend, and its great because there are no strings thrown around - though i can definitely see how that is of putting
if you find a way to reconcile it with using ReactS please do tell, so we can add it to the readme for example
if not, we could make the type of all those refs ComponentM => Unit | String so it would work for everybody
@dozed ^^
elyphas
@elyphas
Mar 09 2016 23:54
How can I avoid that the content of one cell overlap another in ReactTable?
Stefan Ollinger
@dozed
Mar 09 2016 23:55
@oyvindberg The infinite cycle happens with runNow while the component is being initialized MuiTextField(ref = (x: MuiTextFieldM) => { scope.modState(_.copy(textFieldM = x)).runNow }). I am not sure about all the details yet.
elyphas
@elyphas
Mar 09 2016 23:55
it seems that this happens only when word length is larger thant the width of the cell
I think must use this:"val config = List(("email", None, None, Some(2.0))) // getStringSort is helper function"