Is there a way to check if `modifier.semantics(mer...
# compose
a
Is there a way to check if
modifier.semantics(mergeDescendants = true)
is set? I am facing a problem where the inner components (children) have a custom Talback order and uses `mergeDescendants`in some cases to merge chunks of texts and other content. But in some cases I want to override this behaviour by using
mergeDescendants = true
in a parent composable.
Copy code
@Composable
fun ItemWithBorder(modifier: Modifier = Modifier.semantics(mergeDescendants = true) {}) { // `mergeDescendants = true` is set from an outer function
    // Parent
    Column(
        modifier
            .border(BorderStroke(1.dp, Color.Black))
            .padding(16.dp)) {
        // Child
        Column(Modifier.semantics(true) { }) { // `true` here will override the parent nodes `mergeDescendants = true`
            Text(text = "Text 1")
            Text(text = "Text 2")
        }
        // Child
        Column(Modifier.semantics(true) { }) { // `true` here will override the parent nodes `mergeDescendants = true`
            Text(text = "Text 3")
            Text(text = "Text 4")
        }
    }
}
Any ideas?
This is the wanted behaviour: