Skip to main content

withParamPrefix()

withParamPrefix(value: unknown, paramPrefix?: string): string

Defined in: packages/core/src/utils/formatQuery/utils.ts:348

Prefixes a named-parameter value with the given paramPrefix unless the value already begins with it. Used by formatQuery to render rules whose valueSource is "parameter" (e.g. "p1" with prefix ":"":p1"; ":p1"":p1").

Parameters

ParameterTypeDefault value
valueunknownundefined
paramPrefixstring':'

Returns

string


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.