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 d40a9f8 commit 2f8644bCopy full SHA for 2f8644b
1 file changed
src/generate.tsx
@@ -183,7 +183,7 @@ export interface GenerateConfig<OptionsType extends object[]> {
183
) => OptionsType;
184
/** Check if a value is disabled */
185
isValueDisabled: (value: RawValueType, options: FlattenOptionsType<OptionsType>) => boolean;
186
- warningProps: (props: any) => void;
+ warningProps?: (props: any) => void;
187
fillOptionsWithMissingValue?: (
188
options: OptionsType,
189
value: DefaultValueType,
@@ -841,7 +841,7 @@ export default function generateSelector<
841
}
842
843
// ============================ Warning =============================
844
- if (process.env.NODE_ENV !== 'production') {
+ if (process.env.NODE_ENV !== 'production' && warningProps) {
845
warningProps(props);
846
847
0 commit comments