File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
core/src/main/scala/japgolly/scalajs/react Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,16 @@ object CallbackOption {
88 def apply [A ](cb : CallbackTo [Option [A ]]): CallbackOption [A ] =
99 new CallbackOption (cb.toScalaFn)
1010
11+ @ deprecated(" Use CallbackOption.pass instead." , " 0.10.1" )
1112 def empty : CallbackOption [Unit ] =
13+ pass
14+
15+ def pass : CallbackOption [Unit ] =
1216 CallbackOption (CallbackTo pure someUnit)
1317
18+ def fail [A ]: CallbackOption [A ] =
19+ CallbackOption (CallbackTo pure None )
20+
1421 def pure [A ](a : A ): CallbackOption [A ] =
1522 CallbackOption (CallbackTo pure Some (a))
1623
Original file line number Diff line number Diff line change 3838 If you're looking for ways to block (eg. turning a ` Callback[Future[A]] ` into a ` Callback[A] ` ),
3939 it is not supported by Scala.JS (See [ #1996 ] ( https://github.com/scala-js/scala-js/issues/1996 ) ).
4040
41+ * Add ` CallbackOption.{pass,fail} ` .
42+
4143* Add ` React.Children.toArray ` .
4244
4345* Upgrade React to 0.14.1. Adds new attributes:
You can’t perform that action at this time.
0 commit comments