Skip to content

Commit

Permalink
reactSelectPlus 0.1.2: Select.Creatable: add isOptionUnique prop
Browse files Browse the repository at this point in the history
  • Loading branch information
nafg committed Mar 14, 2018
1 parent 7dff276 commit 5e745e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy val reactSelectPlus =
.enablePlugins(ScalaJSBundlerPlugin)
.settings(
basicSettings("react-select-plus", "1.0.0-rc.10.patch1"),
version := "0.1.1"
version := "0.1.2"
)

lazy val reactInputMask =
Expand Down
9 changes: 9 additions & 0 deletions reactSelectPlus/src/main/scala/reactselectplus/Select.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ abstract class DataSelectOption[A] extends SelectOption[A] {
@ScalaJSDefined
abstract class GroupSelectOption[A] extends SelectOption[A] with OptionsWrapper[A]

@js.native
trait IsOptionUniqueArg[A] extends js.Object {
val option: DataSelectOption[A]
val options: js.Array[DataSelectOption[A]]
val labelKey: String
val valueKey: String
}

object SelectOption {
def apply[A](value0: String, data0: A): DataSelectOption[A] = apply(value0, data0, data0.toString)

Expand Down Expand Up @@ -119,6 +127,7 @@ object Select {
(valueRenderer: Option[DataSelectOption[A] => VdomElement] = None,
optionRenderer: Option[SelectOption[A] => VdomElement] = None,
filterOption: Option[(DataSelectOption[A], String) => Boolean] = None,
isOptionUnique: Option[IsOptionUniqueArg[A] => Boolean] = None,
clearable: Boolean = false,
placeholder: Option[String] = None,
onInputChange: Option[String => Callback] = None,
Expand Down

0 comments on commit 5e745e2

Please sign in to comment.