Is there a way to avoid the error message when usi...
# react
s
Is there a way to avoid the error message when using select tag in render?
Copy code
override fun RBuilder.render() {
		val options = listOf("foo", "bar", "baz")
		select {
			attrs.value = "foo"
			attrs.onChangeFunction = {}

			options.forEach {
				option {
					key = it
					attrs.value = it
					+it
				}
			}
		}
	}
Warning: The value prop supplied to <select> must be a scalar value if multiple is false.
solution
attrs["value"] = state.value
attrs.value creates a set with a string