diff --git a/packages/pluggableWidgets/checkbox-radio-selection-web/CHANGELOG.md b/packages/pluggableWidgets/checkbox-radio-selection-web/CHANGELOG.md index 6c69019ea9..33a372d67e 100644 --- a/packages/pluggableWidgets/checkbox-radio-selection-web/CHANGELOG.md +++ b/packages/pluggableWidgets/checkbox-radio-selection-web/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Added + +- We added new options for readonly style: "Selected content only". This options will display text of only the selected items when widget is in readonly mode. This is also alters the previous readonly mode: "Content only", to now display text of all available items. + ## [1.1.1] - 2026-02-24 ### Fixed diff --git a/packages/pluggableWidgets/checkbox-radio-selection-web/src/CheckboxRadioSelection.xml b/packages/pluggableWidgets/checkbox-radio-selection-web/src/CheckboxRadioSelection.xml index 9ec2a27136..045056ec8a 100644 --- a/packages/pluggableWidgets/checkbox-radio-selection-web/src/CheckboxRadioSelection.xml +++ b/packages/pluggableWidgets/checkbox-radio-selection-web/src/CheckboxRadioSelection.xml @@ -253,6 +253,7 @@ Control Content only + Selected content only diff --git a/packages/pluggableWidgets/checkbox-radio-selection-web/src/components/CheckboxSelection/CheckboxSelection.tsx b/packages/pluggableWidgets/checkbox-radio-selection-web/src/components/CheckboxSelection/CheckboxSelection.tsx index ec3604ee93..3a567949ba 100644 --- a/packages/pluggableWidgets/checkbox-radio-selection-web/src/components/CheckboxSelection/CheckboxSelection.tsx +++ b/packages/pluggableWidgets/checkbox-radio-selection-web/src/components/CheckboxSelection/CheckboxSelection.tsx @@ -48,7 +48,9 @@ export function CheckboxSelection({ {options.map((optionId, index) => { const isSelected = currentIds.includes(optionId); const checkboxId = `${inputId}-checkbox-${index}`; - + if (isReadOnly && !isSelected && readOnlyStyle === "selectedText") { + return null; + } return (
{ const isSelected = currentId === optionId; const controlId = `${inputId}-${selector.controlType}-${index}`; - if (isReadOnly && !isSelected && readOnlyStyle === "text") { + if (isReadOnly && !isSelected && readOnlyStyle === "selectedText") { return null; } @@ -68,7 +68,7 @@ export function RadioSelection({ "widget-checkbox-radio-selection-item-selected": isSelected })} > - +