Skip to content

Commit 4353d2f

Browse files
committed
Update scalajsReact to 0.11.0.
* Update react to 15.0.1. * Use e.extract to get the target of an event to get around japgolly/scalajs-react#255. Tests didn't catch this bug. :(
1 parent 9a4bf8d commit 4353d2f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ val commonSettings = Seq(
1919
val sprayVersion = "1.3.3"
2020
val upickleVersion = "0.3.9"
2121
val scalatagsVersion = "0.5.4"
22-
val scalajsReactVersion = "0.10.4"
23-
val reactVersion = "0.14.3"
22+
val scalajsReactVersion = "0.11.0"
23+
val reactVersion = "15.0.1"
2424
val bootstrapVersion = "3.3.6"
2525

2626
val shared = crossProject.in(file(".")).settings(commonSettings:_*)

client/src/main/scala/com/gshakhn/privatewiki/client/components/BinderLoader.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ object BinderLoader {
2020

2121
class Backend($: BackendScope[Props, State])(implicit executionContext: ExecutionContext) {
2222
def updateBinderName(e: ReactEventI): Callback = {
23-
$.modState(s => s.copy(binderName = e.target.value))
23+
e.extract(_.target.value){binderName => $.modState(s => s.copy(binderName = binderName))}
24+
2425
}
2526

2627
def updateBinderPassword(e: ReactEventI): Callback = {
27-
$.modState(s => s.copy(binderPassword = e.target.value))
28+
e.extract(_.target.value){binderPassword => $.modState(s => s.copy(binderPassword = binderPassword))}
2829
}
2930

3031
def loadBinder(e: ReactEventI): Callback = {

client/src/main/scala/com/gshakhn/privatewiki/client/components/PaperPicker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ object PaperPicker {
2929
}
3030

3131
def updateSearch(e: ReactEventI): Callback = {
32-
$.modState(s => s.copy(searchText = e.target.value))
32+
e.extract(_.target.value){searchText => $.modState(s => s.copy(searchText = searchText))}
3333
}
3434

3535
def papers(props: Props, state: State): Seq[(Binder, Paper)] = {

0 commit comments

Comments
 (0)