Marcin Wisniowski
10/24/2024, 10:31 AMModifier.onClick
is still experimental? It's one of the most basic modifiers I use everywhere.Sean Proctor
10/24/2024, 1:54 PMModifier.clickable
is the stable interface unless you're doing something that specifically needs Modifier.onClick
.Marcin Wisniowski
10/24/2024, 2:19 PMModifier.clickable
does the extra Material Design ripple / other indication, that I don't need in a desktop app. I just want a click handler.Sean Proctor
10/24/2024, 2:24 PMSean Proctor
10/24/2024, 2:26 PMModifier.onClick
from there. If the API changes, you only have one place to update.Marcin Wisniowski
10/24/2024, 2:27 PMYou can disable the indication if that's the issue.I assumes that's what
onClick
is for - a clickable
for when you don't want indications.Sean Proctor
10/24/2024, 2:30 PMConsider using clickable if it's necessary to handle only primary clicks. Unlike clickable, onClick doesn't add Modifier. indication, Modifier. hoverable, Modifier. focusable, click by Enter key, etc. If necessary, one has to add those manually when using onClick.I think
onClick
is for the cases where you need to handle other click types.Damien
01/10/2025, 2:23 PMModifier.clickable
is not triggered but Modifier.OnFocus
is working.