diff --git a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx index 9f8a3cc0..9a29a6bb 100644 --- a/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx +++ b/src/components/SearchBar/SearchBarColumn/SolidChoiceColumn/index.tsx @@ -5,15 +5,17 @@ import { SearchBarColumnSolidChoiceTypeProps } from '../types'; export function SolidChoiceColumn(props: SearchBarColumnSolidChoiceTypeProps) { const { columnFilterValue } = props; - const { options, defaultValue } = columnFilterValue.column; + const { value } = columnFilterValue; + const { options } = columnFilterValue.column; const { onSelect } = useSolidChoiceColumn(props); return ( - onSelect(e.target.value)}> - {options.map((c) => ( - - {c.display} + // NOTE: Radio.Button defaultChecked and checked cannot be applied properly to check Coding value. + onSelect(e.target.value)}> + {options.map((coding) => ( + + {coding.display} ))} diff --git a/src/components/SearchBar/hooks.ts b/src/components/SearchBar/hooks.ts index 50a5f596..acfc20cd 100644 --- a/src/components/SearchBar/hooks.ts +++ b/src/components/SearchBar/hooks.ts @@ -45,7 +45,7 @@ export function useSearchBar(props: SearchBarProps): SearchBarData { } if (isSolidChoiceColumn(column)) { - return { column, value: null }; + return { column, value: column.defaultValue ? [column.defaultValue] : null }; } throw new Error('Unsupported column type');