We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 114f38b commit 78942cdCopy full SHA for 78942cd
packages/kit-headless/src/components/select/select-inline.tsx
@@ -84,6 +84,17 @@ export const Select: FunctionComponent<SelectProps> = (props) => {
84
}
85
86
87
+ // console warning if a consumer's passed in value does not match an option
88
+ if (props.value) {
89
+ const valueMatch = opts.some((opt) => opt.value === props.value);
90
+
91
+ if (!valueMatch) {
92
+ console.error(
93
+ `Qwik UI: the provided option value "${props.value}" does not match any of the option values in the Select.`,
94
+ );
95
+ }
96
97
98
return (
99
<SelectImpl {...rest} _valuePropIndex={valuePropIndex} _options={opts}>
100
{props.children}
0 commit comments