Building a desktop app, and using `Modifier.combin...
# compose-desktop
a
Building a desktop app, and using
Modifier.combinedClickable().indication()
on a
Box
, and having a hard time figuring out how to just set the indication to null. As I understand it, I should just be able to set
indication = null
, but when I do
.indication(indication = null)
it complains about no value passed for
interactionSource
. Not really sure what I should pass there. There was this workaround I found from a few weeks ago (
interactionSource = remember { MutableInteractionSource() }, indication = null
) but that doesn't seem to have any effect, the indication is still there.
c
I think it’s possible that the indication inside
combinedClickable()
is taking precedence. Have a look at the source code for
combinedClickable()
and you will see:
Copy code
indication = LocalIndication.current,
interactionSource = remember { MutableInteractionSource() }
Therefore I think you may need to use:
Copy code
combinedClickable(
  indication = null,
  interactionSource = remember { MutableInteractionSource() }
)
a
Ah I understand. Honestly, that is confusing to me, I feel like either way should work, unless I'm seriously misunderstanding something about modifiers. But yes, it does appear that moving them to the
combinedClickable()
solves the issue, so thanks for the help! I did check the source for
indication()
but never thought to check for
combinedClickable()
so I'll keep that in mind next time.
c
I think it makes sense.
combinedClickable
adds an indication because that's normally what people want by default when they click. However
indication()
exists separately so you can modify with that small piece of functionality. You know, like, composable :D