getOption()
getOption<
OptType
>(arr
,name
):undefined
|OptType
Gets the option from an OptionList with the given name
. Handles
Option arrays as well as OptionGroup arrays.
Type parameters
Type parameter | Value |
---|---|
OptType extends Option <string > | Option <string > |
Parameters
Parameter | Type |
---|---|
arr | OptionList <OptType > |
name | string |
Returns
undefined
| OptType
Source
packages/react-querybuilder/src/utils/optGroupUtils.ts:52
caution
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.