getValueEditorReset()
getValueEditorReset(
__namedParameters: {inputType?:InputType|null;operator:string;skipHook?:boolean;type?:string;value:unknown; }): {reset:boolean;value:unknown; }
Defined in: packages/core/src/utils/deriveValueEditor.ts:31
Determines whether a rule's value needs to be collapsed to a single element because it no
longer represents a list, and what it should become.
This happens when the value is an array (or a comma-containing string in a number input,
which <input type="number"> can't display) while the operator is not one of the multi-value
operators and the editor is not a multiselect—typically right after the operator changes from
"in" or "between" to something else.
The React useValueEditor hook applies the result in an effect; other implementations may
apply it wherever is idiomatic.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | { inputType?: InputType | null; operator: string; skipHook?: boolean; type?: string; value: unknown; } |
__namedParameters.inputType? | InputType | null |
__namedParameters.operator | string |
__namedParameters.skipHook? | boolean |
__namedParameters.type? | string |
__namedParameters.value | unknown |
Returns
{ reset: boolean; value: unknown; }
reset
reset:
boolean
value
value:
unknown
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.