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

29th
Jun 2017
Todd Burnside
@toddburnside
Jun 29 2017 02:44

@rleibman WRT ReactTable, I was trying out scalajs-react-components the other day. Since I was on scalajs-react v 1.0.0, I found your repo and used some of that code. I found a bug in ReactTable that occurred when specifying a sort. Apparently, if you use .when(...), the code in the still gets evaluated. It was trying to access a non-existent element of a map. I replaced

props.style
                      .sortIcon(state.sortedState(item) == ASC)
                      .when(state.sortedState.isDefinedAt(item))

with

state.sortedState
                        .get(item)
                        .whenDefined(value =>
                          props.style.sortIcon(value == ASC))
If you'd like I can put in a PR to your repo for this. It may not be the only problem, but it did allow me to use ReactTable.
Roberto Leibman
@rleibman
Jun 29 2017 15:41
@toddburnside @toddburnside Yeah, I found that as well, but haven't fixed it in the repo yet, yes, please submit a PR.
I'm using a different copy-paste version of ReactTable, one that's parametrized, much more object oriented. I wanted to get this version of the components out, and then I planned to put in my new ReactTable.
Roberto Leibman
@rleibman
Jun 29 2017 15:47
Other than that... do things look good?
Todd Burnside
@toddburnside
Jun 29 2017 18:15
@rleibman Yep. Things are working OK. But, currently I'm really just using ReactTable and Google Maps. Regarding the table, I was going to take a shot at redesigning it, too, to make it more type safe. If you're already on that, I'll hold off. I'll put in a PR for ReactTable this afternoon or evening. All of that stuff is on my personal laptop... I don't get to use this stuff at work, yet. Soon, I hope...
Roberto Leibman
@rleibman
Jun 29 2017 18:42
Yeah, please hold off... this is my second swipe at it and I'm pretty happy, but I didn't want to mess with the 1.0.0 stuff, as that's more urgent.
√ėyvind Raddum Berg
@oyvindberg
Jun 29 2017 19:32
hey there @rleibman - apologies for the radio silence
im pretty happy with everything too, except for the bundling of css, webpack, and all those things
i can look at that in the weekend or right after, and then we do the release
i think ive said that before, even
but at least we're very close