Skip to main content

getValueSourcesUtil()

getValueSourcesUtil<F, O>(fieldData: F, operator: string, getValueSources?: (field: GetOptionIdentifierType<F>, operator: O, misc: { fieldData: F; }) => ValueSources): ValueSources

Utility function to get the value sources array for the given field and operator. If the field definition does not define a valueSources property, the getValueSources prop is used. Returns ["value"] by default.

Type Parameters

Type Parameter
F extends FullField<string, string, string, Option<string>, Option<string>>
O extends string

Parameters

ParameterType
fieldDataF
operatorstring
getValueSources?(field: GetOptionIdentifierType<F>, operator: O, misc: { fieldData: F; }) => ValueSources

Returns

ValueSources

Defined in

packages/react-querybuilder/src/utils/getValueSourcesUtil.ts:19


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.