@gisce/react-ooui 1.4.0-rc.0 → 1.4.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/hooks/useSearch.ts
CHANGED
|
@@ -107,7 +107,13 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
107
107
|
});
|
|
108
108
|
|
|
109
109
|
const { colors, status } = getTree(treeView!);
|
|
110
|
-
|
|
110
|
+
const attrs: any = {};
|
|
111
|
+
if (colors) {
|
|
112
|
+
attrs.colors = colors;
|
|
113
|
+
}
|
|
114
|
+
if (status) {
|
|
115
|
+
attrs.status = status;
|
|
116
|
+
}
|
|
111
117
|
|
|
112
118
|
const resultsWithData =
|
|
113
119
|
await ConnectionProvider.getHandler().readEvalUiObjects({
|
|
@@ -118,10 +124,7 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
118
124
|
? { ...treeView!.fields, [treeView!.field_parent]: {} }
|
|
119
125
|
: treeView!.fields,
|
|
120
126
|
context,
|
|
121
|
-
attrs
|
|
122
|
-
colors,
|
|
123
|
-
status,
|
|
124
|
-
},
|
|
127
|
+
attrs,
|
|
125
128
|
});
|
|
126
129
|
const resultsData = resultsWithData[0];
|
|
127
130
|
|
|
@@ -173,7 +176,14 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
173
176
|
const { params, newOffset } = opts || {};
|
|
174
177
|
|
|
175
178
|
const mergedParams = mergeParams(params || searchParams, domain);
|
|
176
|
-
const { colors, status } = getTree(treeView!);
|
|
179
|
+
const { colors, status } = getTree(treeView!); const attrs: any = {};
|
|
180
|
+
if (colors) {
|
|
181
|
+
attrs.colors = colors;
|
|
182
|
+
}
|
|
183
|
+
if (status) {
|
|
184
|
+
attrs.status = status;
|
|
185
|
+
}
|
|
186
|
+
|
|
177
187
|
|
|
178
188
|
const { totalItems, results, attrsEvaluated } =
|
|
179
189
|
await ConnectionProvider.getHandler().searchForTree({
|
|
@@ -185,7 +195,7 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
185
195
|
? { ...treeView!.fields, [treeView!.field_parent]: {} }
|
|
186
196
|
: treeView!.fields,
|
|
187
197
|
context,
|
|
188
|
-
attrs
|
|
198
|
+
attrs,
|
|
189
199
|
});
|
|
190
200
|
setColorsForResults(getColorMap(attrsEvaluated));
|
|
191
201
|
setStatusForResults(getStatusMap(attrsEvaluated));
|