andylamax
06/10/2023, 5:17 PMDiv {
DisposableEffect {
val el = scopeElement
onDispose { }
}
}
How does one grab the scope element of an Input
, as the DisposableEffect
is only accessible in the content of a TagElement
??
Use Case.
I need to get a reference of a hidden file input element and the compose-html api currently doesn't give me an idiomatic way to grab the reference of the input
I know I can create an Id
for the element, but it gets tricky when the composable is meant to be rendered multiple times in the same pageDavid Herman
06/10/2023, 5:35 PMInput(InputType.Text, attrs = {
ref { element ->
onDispose { }
}
})
andylamax
06/10/2023, 5:36 PMDavid Herman
06/10/2023, 5:36 PM