Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit f4c45a9

Browse files
committed
Default the selection title to an empty string
If the selection title is undefined, we get a tooltip of 'undefined'.
1 parent 5db2cb4 commit f4c45a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/components/cardContainer/selectableCardContainer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export class SelectableCardContainerComponent<T extends IdentityItem> extends Ca
142142
selection = {
143143
item: item,
144144
selected: false,
145+
selectionTitle: '',
145146
};
146147
} else {
147148
selection.item = item;
@@ -157,7 +158,7 @@ export class SelectableCardContainerComponent<T extends IdentityItem> extends Ca
157158
if (this.disableSelection) {
158159
const disabledReason: string = this.disableSelection({ item: selection.item });
159160
selection.disabledSelection = (disabledReason != null);
160-
selection.selectionTitle = (selection.disabledSelection ? disabledReason : defaultSelectionTitle);
161+
selection.selectionTitle = (selection.disabledSelection ? disabledReason : defaultSelectionTitle) || '';
161162
}
162163
return selection;
163164
}

0 commit comments

Comments
 (0)