https://kotlinlang.org logo
#kobweb
Title
# kobweb
f

Funyinoluwa Kashimawo

10/03/2023, 4:41 PM
Hi @David Herman I noticed something, could you please explain this behaviour. For a TextInput field if I have do this
Copy code
var title by remember { mutableStateOf("") }
and pass it down to the input and like this
Copy code
Input(
        inputType, attrs = Modifier
            .toAttrs {
                value?.let {
                    this.value("$it")
                }
                if (readOnly)
                    readOnly()
                onChange {
                    onTextChanged(it.value)
                }
            }
    )
the Input field is not updated onTextChange But if I use this
Copy code
var title by remember { mutableStateOf<String?>(null) }
then it works fine
d

David Herman

10/03/2023, 4:43 PM
You're using the Compose HTML version. How about using Silk's version?
The compose HTML versions are a little hard to use
f

Funyinoluwa Kashimawo

10/03/2023, 5:43 PM
Ooh really, so apparently I have been using compose HTML Is there a link that shows a catalog of the available Silk components?
Seen, it's the same name. Thanks
d

David Herman

10/03/2023, 6:51 PM
Eventually https://kobweb.varabyte.com will have a silk widgets section. For now, I'm afraid not yet. But you can look for auto-complete names inside the
silk
package
f

Funyinoluwa Kashimawo

10/04/2023, 10:17 AM
Thanks