Skip to content

Commit

Permalink
Updated state in Checkbox component to remember checked state.
Browse files Browse the repository at this point in the history
  • Loading branch information
lamba92 committed Oct 25, 2023
1 parent 1783329 commit aed63b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fun Checkbox(
icons: CheckboxIcons = JewelTheme.checkboxStyle.icons,
textStyle: TextStyle = LocalTextStyle.current,
) {
val state by remember { mutableStateOf(ToggleableState(checked)) }
val state by remember(checked) { mutableStateOf(ToggleableState(checked)) }
CheckboxImpl(
state = state,
onClick = { onCheckedChange.invoke(!checked) },
Expand Down

0 comments on commit aed63b8

Please sign in to comment.