Skip to content

Commit 45c9d41

Browse files
Update src/react-components/input/SelectInputField.js
Co-authored-by: Exairnous <mythologylover75@gmail.com>
1 parent 1c4cbaa commit 45c9d41

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/react-components/input/SelectInputField.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ function getSelectedItem(value, options) {
2323

2424
function getItemLabel(item) {
2525
if (item === null || item === undefined) {
26+
console.warn(
27+
"Cannot get the label for the selected item for this SelectInputField because there is no selected item. This probably indicates a bug somewhere, unless you're rendering one of the Storybook stories for the SelectInputField control that contains controls with no default selected item."
28+
);
2629
return "";
2730
}
2831
return typeof item === "object" ? item.label || item.value : item;

0 commit comments

Comments
 (0)