From 0a2a80f206a1b3874296158ed0d681f3cfd7a255 Mon Sep 17 00:00:00 2001 From: Veyndan Stuart Date: Sat, 2 Apr 2022 19:04:17 +0200 Subject: [PATCH] Remove unnecessary parameter to required As [`required` is a boolean attribute](https://html.spec.whatwg.org/multipage/input.html#the-required-attribute), `required(false)` would confusingly make the input required. --- .../kotlin/org/jetbrains/compose/web/attributes/Attrs.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/Attrs.kt b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/Attrs.kt index 8cac1bd7d4a..ddf0a6def80 100644 --- a/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/Attrs.kt +++ b/web/core/src/jsMain/kotlin/org/jetbrains/compose/web/attributes/Attrs.kt @@ -194,8 +194,8 @@ fun AttrsScope.placeholder(value: String) = fun AttrsScope.readOnly() = attr("readonly", "") -fun AttrsScope.required(value: Boolean = true) = - attr("required", value.toString()) +fun AttrsScope.required() = + attr("required", "") fun AttrsScope.size(value: Int) = attr("size", value.toString())