Is there any way to allow `ClickableText` to pass ...
# compose
r
Is there any way to allow
ClickableText
to pass touches to underlying components? In the case that the user does not click on a specific text, I hope that
ClickableText
can pass the click event without consuming the click event, such as a clickable
Card
s
I had to copy over the code and modify detectTapGestures to only consume pointer events when they were made on a link
r
ok 🤣 thanks
j
hey @saket sorry to dig up an old thread, but I am looking at doing exactly this.. any tips? if we look at the signature of detectTapGestures:
Copy code
suspend fun PointerInputScope.detectTapGestures(
    onDoubleTap: ((Offset) -> Unit)? = null,
    onLongPress: ((Offset) -> Unit)? = null,
    onPress: suspend PressGestureScope.(Offset) -> Unit = NoPressGesture,
    onTap: ((Offset) -> Unit)? = null
)
..my current line of thinking is to have another parameter like
shouldConsumeTapAtOffset: (Offset) -> Boolean
which will allow the caller to control whether these events should be consumed or not
s
yep that's close to what I'm doing