Marcin Wisniowski
05/04/2023, 2:31 PMSurface
has separate versions for having or not having an onClick
parameter. The control I’m building with it can be disabled, and then it shouldn’t be clickable. Normally I could conditionally apply Modifier.clickable
, but with Surface
I don’t see a clean way of achieving this without writing two separate `Surface`s to toggle between. Am I missing something?romainguy
05/04/2023, 2:36 PMromainguy
05/04/2023, 2:36 PMromainguy
05/04/2023, 2:36 PMromainguy
05/04/2023, 2:36 PMromainguy
05/04/2023, 2:36 PMMarcin Wisniowski
05/04/2023, 2:37 PMSurface
, you don’t use a Modifier to have it be clickable, the Surface
itself has an onClick
argument, and there is a separate version that doesn’t.Marcin Wisniowski
05/04/2023, 2:38 PMModifier.clickable
.Marcin Wisniowski
05/04/2023, 2:48 PMSurface
also has an enabled
argument that does exactly what I need. 😄romainguy
05/04/2023, 3:08 PMenabled
nextromainguy
05/04/2023, 3:09 PMColton Idle
05/04/2023, 3:39 PMColton Idle
05/04/2023, 3:39 PMColton Idle
05/04/2023, 3:39 PMMarcin Wisniowski
05/04/2023, 5:47 PMenabled
argument, which answers your version of this question. 😄Colton Idle
05/04/2023, 8:59 PM