Skip to main content

QueryBuilderDndContextProps

Properties

baseControls

baseControls: Pick<Required<SetNonNullable<Partial<{ actionElement: ComponentType<ActionProps>; addGroupAction: null | ComponentType<ActionWithRulesAndAddersProps>; addRuleAction: null | ComponentType<ActionWithRulesAndAddersProps>; cloneGroupAction: null | ComponentType<ActionWithRulesProps>; cloneRuleAction: null | ComponentType<ActionProps>; combinatorSelector: null | ComponentType<CombinatorSelectorProps>; dragHandle: null | ForwardRefExoticComponent<DragHandleProps & RefAttributes<HTMLElement>>; fieldSelector: null | ComponentType<FieldSelectorProps<FullField<string, string, string, Option<string>, Option<string>>>>; inlineCombinator: null | ComponentType<InlineCombinatorProps>; lockGroupAction: null | ComponentType<ActionWithRulesProps>; lockRuleAction: null | ComponentType<ActionWithRulesProps>; notToggle: null | ComponentType<NotToggleProps>; operatorSelector: null | ComponentType<OperatorSelectorProps>; removeGroupAction: null | ComponentType<ActionWithRulesProps>; removeRuleAction: null | ComponentType<ActionProps>; rule: ComponentType<RuleProps<string, string>>; ruleGroup: ComponentType<RuleGroupProps<FullField<string, string, string, Option<string>, Option<string>>, string>>; ruleGroupBodyElements: ComponentType<RuleGroupProps<FullOption<string>, string> & { actions: QueryActions; combinator: string; context: any; disabled: boolean; dragMonitorId: string | symbol; dragRef: Ref<HTMLSpanElement>; dropEffect: DropEffect; dropMonitorId: string | symbol; dropRef: Ref<HTMLDivElement>; id: string; isDragging: boolean; isOver: boolean; not: boolean; parentDisabled: boolean; path: Path; previewRef: Ref<HTMLDivElement>; rules: RuleOrGroupArray; schema: Schema<FullOption<string>, string>; shiftDownDisabled: boolean; shiftUpDisabled: boolean; translations: Translations; } & { accessibleDescription: string; addGroup: ActionElementEventHandler; addRule: ActionElementEventHandler; classNames: Pick<{ actionElement: string; addGroup: string; addRule: string; betweenRules: string; body: string; branches: string; cloneGroup: string; cloneRule: string; combinators: string; disabled: string; dndCopy: string; dndDragging: string; dndOver: string; dragHandle: string; fields: string; header: string; invalid: string; lockGroup: string; lockRule: string; notToggle: string; operators: string; queryBuilder: string; removeGroup: string; removeRule: string; rule: string; ruleGroup: string; shiftActions: string; valid: string; value: string; valueListItem: string; valueSelector: string; valueSource: string; }, "removeGroup" | "addRule" | "addGroup" | "combinators" | "notToggle" | "dragHandle" | "lockGroup" | "shiftActions" | "body" | "header" | "cloneGroup">; cloneGroup: ActionElementEventHandler; onCombinatorChange: ValueChangeEventHandler; onGroupAdd: (group: RuleGroupTypeAny, parentPath: Path, context?: any) => void; onIndependentCombinatorChange: (value: any, index: number, context?: any) => void; onNotToggleChange: (checked: boolean, context?: any) => void; outerClassName: string; pathsMemo: { disabled: boolean; path: Path; }[]; removeGroup: ActionElementEventHandler; ruleGroup: RuleGroupType<RuleType<..., ..., ..., ...>, string> | RuleGroupTypeIC<RuleType<..., ..., ..., ...>, string>; shiftGroupDown: (event?: MouseEvent<..., ...>, context?: any) => void; shiftGroupUp: (event?: MouseEvent<..., ...>, context?: any) => void; toggleLockGroup: ActionElementEventHandler; validationClassName: string; validationResult: boolean | ValidationResult; }>; ruleGroupHeaderElements: ComponentType<RuleGroupProps<FullOption<string>, string> & { actions: QueryActions; combinator: string; context: any; disabled: boolean; dragMonitorId: string | symbol; dragRef: Ref<HTMLSpanElement>; dropEffect: DropEffect; dropMonitorId: string | symbol; dropRef: Ref<HTMLDivElement>; id: string; isDragging: boolean; isOver: boolean; not: boolean; parentDisabled: boolean; path: Path; previewRef: Ref<HTMLDivElement>; rules: RuleOrGroupArray; schema: Schema<FullOption<string>, string>; shiftDownDisabled: boolean; shiftUpDisabled: boolean; translations: Translations; } & { accessibleDescription: string; addGroup: ActionElementEventHandler; addRule: ActionElementEventHandler; classNames: Pick<{ actionElement: string; addGroup: string; addRule: string; betweenRules: string; body: string; branches: string; cloneGroup: string; cloneRule: string; combinators: string; disabled: string; dndCopy: string; dndDragging: string; dndOver: string; dragHandle: string; fields: string; header: string; invalid: string; lockGroup: string; lockRule: string; notToggle: string; operators: string; queryBuilder: string; removeGroup: string; removeRule: string; rule: string; ruleGroup: string; shiftActions: string; valid: string; value: string; valueListItem: string; valueSelector: string; valueSource: string; }, "removeGroup" | "addRule" | "addGroup" | "combinators" | "notToggle" | "dragHandle" | "lockGroup" | "shiftActions" | "body" | "header" | "cloneGroup">; cloneGroup: ActionElementEventHandler; onCombinatorChange: ValueChangeEventHandler; onGroupAdd: (group: RuleGroupTypeAny, parentPath: Path, context?: any) => void; onIndependentCombinatorChange: (value: any, index: number, context?: any) => void; onNotToggleChange: (checked: boolean, context?: any) => void; outerClassName: string; pathsMemo: { disabled: boolean; path: Path; }[]; removeGroup: ActionElementEventHandler; ruleGroup: RuleGroupType<RuleType<..., ..., ..., ...>, string> | RuleGroupTypeIC<RuleType<..., ..., ..., ...>, string>; shiftGroupDown: (event?: MouseEvent<..., ...>, context?: any) => void; shiftGroupUp: (event?: MouseEvent<..., ...>, context?: any) => void; toggleLockGroup: ActionElementEventHandler; validationClassName: string; validationResult: boolean | ValidationResult; }>; shiftActions: null | ComponentType<ShiftActionsProps>; valueEditor: null | ComponentType<ValueEditorProps<FullField<string, string, string, Option<string>, Option<string>>, string>>; valueSelector: ComponentType<ValueSelectorProps<FullOption<string>>>; valueSourceSelector: null | ComponentType<ValueSourceSelectorProps>; }>, "notToggle" | "dragHandle" | "valueSourceSelector" | "ruleGroup" | "rule" | "shiftActions" | "actionElement" | "addGroupAction" | "addRuleAction" | "cloneGroupAction" | "cloneRuleAction" | "combinatorSelector" | "fieldSelector" | "inlineCombinator" | "lockGroupAction" | "lockRuleAction" | "operatorSelector" | "removeGroupAction" | "removeRuleAction" | "ruleGroupBodyElements" | "ruleGroupHeaderElements" | "valueEditor" | "valueSelector">>, "ruleGroup" | "rule" | "combinatorSelector">

Defined in

packages/dnd/src/types.ts:42


canDrop()?

optional canDrop: (params: CustomCanDropParams) => boolean

Parameters

ParameterType
paramsCustomCanDropParams

Returns

boolean

Defined in

packages/dnd/src/types.ts:43


useDrag()?

optional useDrag: <DragObject, DropResult, CollectedProps>(specArg: FactoryOrInstance<DragSourceHookSpec<DragObject, DropResult, CollectedProps>>, deps?: unknown[]) => [CollectedProps, ConnectDragSource, ConnectDragPreview]

useDragSource hook

Type Parameters

Type ParameterDefault type
DragObjectunknown
DropResultunknown
CollectedPropsunknown

Parameters

ParameterTypeDescription
specArgFactoryOrInstance<DragSourceHookSpec<DragObject, DropResult, CollectedProps>>-
deps?unknown[]The memoization deps array to use when evaluating spec changes

Returns

[CollectedProps, ConnectDragSource, ConnectDragPreview]

Defined in

packages/dnd/src/types.ts:40


useDrop()?

optional useDrop: <DragObject, DropResult, CollectedProps>(specArg: FactoryOrInstance<DropTargetHookSpec<DragObject, DropResult, CollectedProps>>, deps?: unknown[]) => [CollectedProps, ConnectDropTarget]

useDropTarget Hook

Type Parameters

Type ParameterDefault type
DragObjectunknown
DropResultunknown
CollectedPropsunknown

Parameters

ParameterTypeDescription
specArgFactoryOrInstance<DropTargetHookSpec<DragObject, DropResult, CollectedProps>>-
deps?unknown[]The memoization deps array to use when evaluating spec changes

Returns

[CollectedProps, ConnectDropTarget]

Defined in

packages/dnd/src/types.ts:41


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.