Skip to content

Commit

Permalink
Fix crash when focusing remove button in device list screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Aug 12, 2024
1 parent 364772f commit 29db209
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ internal fun BaseCell(
horizontalArrangement = Arrangement.Start,
modifier =
modifier
.clickable(isRowEnabled, onClick = onCellClicked)
// This is to avoid a crash when a child view is focused and clickable is set to
// false on the parent view
.then(
if (isRowEnabled) {
Modifier.clickable(onClick = onCellClicked)
} else {
Modifier
}
)
.wrapContentHeight()
.defaultMinSize(minHeight = minHeight)
.fillMaxWidth()
Expand Down

0 comments on commit 29db209

Please sign in to comment.