Skip to content

Commit fea943f

Browse files
authored
fix: Arguments of func visually not selected after tree loaded (#1086)
* fix * chlog * 6.6.2
1 parent 51f6d13 commit fea943f

File tree

18 files changed

+31
-22
lines changed

18 files changed

+31
-22
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Changelog
2+
- 6.6.2
3+
- Fixed issue with rendering func select inside func (PR #1086) (issue #1085)
4+
- Added `DefaultUtils` typings to `index.d.ts` (PR #1078) (issue #1079)
5+
- Added config option `exportPreserveGroups` (PR #1077) (issue #1074)
26
- 6.6.1
37
- Operators reverse on "NOT" is now optional, disabled by default to preserve orignal query (PR #1068) (issue #1059).
48
Added settings `reverseOperatorsForNot` and `canShortMongoQuery`
59
- Scope CSS classes to `.query-builder` (PR #1070) (issue #1018)
610
- Update packages (PR #1071)
711
- Fixed issue with `excludeOperators` (affects `prox1` at example) (PR #1072)
12+
- Use pnpm 9 (PR #1073)
813
- 6.6.0
914
- Optimizations for rendering and export utils (PR #1054) (issue #342)
1015
- Added support of JsonLogic export for ternary mode (PR #1013) (issue #978)

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"./packages/*"
55
],
66
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
7-
"version": "6.6.1"
7+
"version": "6.6.2"
88
}

packages/antd/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-awesome-query-builder/antd",
3-
"version": "6.6.1",
3+
"version": "6.6.2",
44
"description": "User-friendly query builder for React. AntDesign widgets",
55
"keywords": [
66
"query-builder",

packages/bootstrap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-awesome-query-builder/bootstrap",
3-
"version": "6.6.1",
3+
"version": "6.6.2",
44
"description": "User-friendly query builder for React. Bootstrap widgets",
55
"keywords": [
66
"query-builder",

packages/core/modules/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ export interface Actions {
720720
setFieldSrc(path: IdPath, fieldSrc: FieldSource): undefined;
721721
setOperator(path: IdPath, operator: string): undefined;
722722
setValue(path: IdPath, delta: number, value: RuleValueI, valueType: string): undefined; // todo: try to support RuleValue
723-
setFuncValue(path: IdPath, delta: number, parentFuncs: string[], argKey: string | null, value: SimpleValue, valueType: string | "!valueSrc"): undefined;
723+
setFuncValue(path: IdPath, delta: number, parentFuncs: Array<[string, string]>, argKey: string | null, value: SimpleValue, valueType: string | "!valueSrc"): undefined;
724724
setValueSrc(path: IdPath, delta: number, valueSrc: ValueSource): undefined;
725725
setOperatorOption(path: IdPath, name: string, value: SimpleValue): undefined;
726726
moveItem(fromPath: IdPath, toPath: IdPath, placement: Placement): undefined;
@@ -757,7 +757,7 @@ export interface TreeActions {
757757
setValue(config: Config, path: IdPath, delta: number, value: RuleValueI, valueType: string): InputAction; // todo: try to support RuleValue
758758
setValueSrc(config: Config, path: IdPath, delta: number, valueSrc: ValueSource): InputAction;
759759
setOperatorOption(config: Config, path: IdPath, name: string, value: SimpleValue): InputAction;
760-
setFuncValue(config: Config, path: IdPath, delta: number, parentFuncs: string[], argKey: string | null, value: SimpleValue, valueType: string | "!valueSrc"): InputAction;
760+
setFuncValue(config: Config, path: IdPath, delta: number, parentFuncs: Array<[string, string]>, argKey: string | null, value: SimpleValue, valueType: string | "!valueSrc"): InputAction;
761761
};
762762
}
763763

packages/core/modules/utils/defaultUtils.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import uuid from "./uuid";
33
import {getFieldConfig, getOperatorConfig, getFieldParts, getFirstField} from "./configUtils";
44
import {getFirstOperator} from "../utils/ruleUtils";
55
import {getNewValueForFieldOp} from "../utils/validation";
6-
import { isImmutable } from "./stuff";
6+
import { isImmutable, isImmutableList } from "./stuff";
77
import { jsToImmutable } from "../import";
88

99

@@ -149,14 +149,14 @@ export const defaultRoot = (config, canAddDefaultRule = true) => {
149149
};
150150

151151
export const createListWithOneElement = (el) => {
152-
if (isImmutable(el))
153-
return el; // already Immutable
152+
if (isImmutableList(el))
153+
return el; // already Immutable list
154154
return createListFromArray([el]);
155155
};
156156

157157
export const createListFromArray = (arr) => {
158-
if (isImmutable(arr))
159-
return arr; // already Immutable
158+
if (isImmutableList(arr))
159+
return arr; // already Immutable list
160160
return new Immutable.List(arr);
161161
};
162162

packages/core/modules/utils/stuff.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,12 @@ export const isImmutable = (v) => {
139139
return typeof v === "object" && v !== null && typeof v.toJS === "function";
140140
};
141141

142+
export const isImmutableList = (v) => {
143+
return isImmutable(v) && Immutable.isList(v); // Immutable.isIndexed(v)
144+
};
145+
142146
export function toImmutableList(v) {
143-
return (isImmutable(v) ? v : new Immutable.List(v));
147+
return (isImmutableList(v) ? v : new Immutable.List(v));
144148
}
145149

146150
export function applyToJS(v) {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-awesome-query-builder/core",
3-
"version": "6.6.1",
3+
"version": "6.6.2",
44
"description": "User-friendly query builder for React. Core",
55
"keywords": [
66
"query-builder",

packages/examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-awesome-query-builder/examples",
3-
"version": "6.6.1",
3+
"version": "6.6.2",
44
"description": "Local hot-reloadable demo for @react-awesome-query-builder",
55
"repository": {
66
"type": "git",

packages/fluent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-awesome-query-builder/fluent",
3-
"version": "6.6.1",
3+
"version": "6.6.2",
44
"description": "User-friendly query builder for React. Fluent 8 widgets",
55
"keywords": [
66
"query-builder",

0 commit comments

Comments
 (0)