https://kotlinlang.org logo
#compose-web
Title
# compose-web
e

Eduardo Zuza

08/03/2022, 2:08 AM
Please, how to put the items inside the select for the user to choose an option? compose-web
Copy code
Div(attrs = { style { id("seAdmRet"); display(DisplayStyle.Block) }; classes("form-group") }) {
            Span { Text("Opção AdmRet - 1") }
            Select(attrs = { classes("custom-select", "mr-sm-2", "dlg-100") }
            ) {                
//                TextInput("ola1","GD")
//                Text( "opa")
//                 Text("olá")
            }
        }
t

Tristan

08/03/2022, 2:23 AM
The same way you would do in HTML 😉 The correct tag is
option
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
e

Eduardo Zuza

08/08/2022, 5:30 PM
Copy code
Select(attrs = { classes("custom-select", "mr-sm-2", "dlg-100") }
) {
    Option(
        value = "GD",
        attrs = ({ value("GD") }),
        content = ({ Text("AdmRetGD")} )
    )

    Option(
        value = "7",
        attrs = ({ value("7") }),
        content = ({ Text("32")} )
    )
}
6 Views