Skip to content

Commit 0364be2

Browse files
committed
fix: show only selected items in readonly content-only mode
1 parent 1ba472a commit 0364be2

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

packages/pluggableWidgets/checkbox-radio-selection-web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- We fixed an issue where checkboxes remained visible in read-only "Content only" mode. Now only selected items are displayed as text, consistent with radio button behavior.
12+
913
## [1.1.1] - 2026-02-24
1014

1115
### Fixed

packages/pluggableWidgets/checkbox-radio-selection-web/src/components/CheckboxSelection/CheckboxSelection.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export function CheckboxSelection({
4848
{options.map((optionId, index) => {
4949
const isSelected = currentIds.includes(optionId);
5050
const checkboxId = `${inputId}-checkbox-${index}`;
51+
if (isReadOnly && !isSelected && readOnlyStyle === "text") {
52+
return null;
53+
}
5154

5255
return (
5356
<div

packages/pluggableWidgets/checkbox-radio-selection-web/src/ui/CheckboxRadioSelection.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
&-readonly {
88
&.widget-checkbox-radio-selection-readonly-text {
9-
.radio-item {
9+
.radio-item,
10+
.checkbox-item {
1011
display: none;
1112

1213
&.widget-checkbox-radio-selection-item-selected {

0 commit comments

Comments
 (0)