Skip to content

Commit

Permalink
pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jesuyedavid committed Feb 14, 2024
1 parent c06ffa8 commit cbb6606
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 6 additions & 7 deletions src/components/Filters/CheckboxOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -164,7 +163,7 @@ export function CheckboxOption(props: CheckboxOptionProps): JSX.Element | null {
disabled={isOptionsDisabled}
/>
<label className={labelClasses} htmlFor={optionId}>
{labelText as ReactNode}
{labelText}
</label>
</div>
{isOptionsDisabled &&
Expand Down

0 comments on commit cbb6606

Please sign in to comment.