diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Checkbox.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Checkbox.kt index c84ba32fb..5a8b657fd 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Checkbox.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/Checkbox.kt @@ -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) },