Skip to content

Commit 7e2da5f

Browse files
committed
Type {min,max}Length attributes to ints
1 parent 47110cc commit 7e2da5f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

core/src/main/scala/japgolly/scalajs/react/vdom/HtmlAttrs.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ trait HtmlAttrs {
546546
*/
547547
final def max = VdomAttr("max")
548548

549-
final def maxLength = VdomAttr("maxLength")
549+
final def maxLength = VdomAttr[Int]("maxLength")
550550

551551
/**
552552
* This attribute specifies the media which the linked resource applies to.
@@ -583,7 +583,7 @@ trait HtmlAttrs {
583583
*/
584584
final def min = VdomAttr("min")
585585

586-
final def minLength = VdomAttr("minLength")
586+
final def minLength = VdomAttr[Int]("minLength")
587587

588588
final def multiple = VdomAttr[Boolean]("multiple")
589589

doc/changelog/1.4.2.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
* Add an immediately-deprecated `AsyncCallback.fromCallback[A](c: CallbackTo[A]): AsyncCallback[A]`
1313
which points users to use `c.asAsyncCallback`.
1414

15-
* Add helper methods to the `autoComplete` attribute, eg. `^.autoComplete.currentPassword`
15+
* VDOM improvements
16+
* Add helper methods to the `autoComplete` attribute, eg. `^.autoComplete.currentPassword`
17+
* `minLength` and `maxLength` now only accept ints
1618

1719
* Dependency upgrades
1820
* Cats 1.6.0

0 commit comments

Comments
 (0)