varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.53k stars 68 forks source link

Modifier.disabled() does not work #546

Closed NorbertSandor closed 4 months ago

NorbertSandor commented 4 months ago

The problem is with:

fun AttrsScope<*>.disabled(value: Boolean = true) {
    attr("disabled", value.toString())
}

The correct implementation would be:

fun AttrsScope<*>.disabled(value: Boolean = true) {
    if (value) {
        attr("disabled", "")
    }
}
DennisTsar commented 4 months ago

Thanks for the report! Will be fixed in 0.18.1.