diff --git a/.github/workflows/update_snapshots.yml b/.github/workflows/update_snapshots.yml index 4bbabbb17..a0ad3c3fc 100644 --- a/.github/workflows/update_snapshots.yml +++ b/.github/workflows/update_snapshots.yml @@ -14,7 +14,7 @@ jobs: with: node-version: 18.x registry-url: 'https://registry.npmjs.org' - - run: npm ci + - run: npm ci - run: npm run build - run: ./tests/scripts/start-storybook.sh env: diff --git a/src/components/Filters/CheckboxOption.tsx b/src/components/Filters/CheckboxOption.tsx index 319c198e2..7cea32111 100644 --- a/src/components/Filters/CheckboxOption.tsx +++ b/src/components/Filters/CheckboxOption.tsx @@ -134,15 +134,14 @@ export function CheckboxOption(props: CheckboxOptionProps): JSX.Element | null { const isSelected = existingStoredFilter ? existingStoredFilter.selected : false; - //handle the case where the displayName is a number range value - let displayNameFromFilterDisplay = ''; + let labelText = ''; if (isNumberRangeValue(displayName)) { - displayNameFromFilterDisplay = getDefaultFilterDisplayName(displayName) - } + //handle the case where the displayName is a number range value + const displayNameFromFilterDisplay = getDefaultFilterDisplayName(displayName) - let labelText = resultsCount ? `${displayName} (${resultsCount})` : displayName; - if (displayNameFromFilterDisplay) { labelText = resultsCount ? `${displayNameFromFilterDisplay} (${resultsCount})` : displayNameFromFilterDisplay; + }else{ + labelText = resultsCount ? `${displayName} (${resultsCount})` : `${displayName}`; } const inputClasses = classNames(cssClasses.input, { @@ -164,7 +163,7 @@ export function CheckboxOption(props: CheckboxOptionProps): JSX.Element | null { disabled={isOptionsDisabled} /> {isOptionsDisabled &&