@evoke-platform/ui-components 1.0.0-dev.248 → 1.0.0-dev.250
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.
@@ -132,7 +132,7 @@ const customSelector = (props) => {
|
|
132
132
|
placeholder = 'Select Operator';
|
133
133
|
if (inputType === 'array') {
|
134
134
|
opts = options
|
135
|
-
.filter((option) => ['null', 'notNull', 'in'
|
135
|
+
.filter((option) => ['null', 'notNull', 'in'].includes(option.name))
|
136
136
|
.map((option) => ({ name: option.name, label: option.label }));
|
137
137
|
val = val === '=' ? '' : options.find((option) => option.name === val).name;
|
138
138
|
}
|
@@ -182,14 +182,14 @@ export function parseMongoDB(mongoQuery) {
|
|
182
182
|
}
|
183
183
|
else if (typeof value.$regex === 'string') {
|
184
184
|
let operator = 'contains';
|
185
|
-
|
185
|
+
let regexValue = value.$regex;
|
186
186
|
if (regexValue.startsWith('^')) {
|
187
187
|
operator = 'beginsWith';
|
188
|
-
regexValue.slice(1);
|
188
|
+
regexValue = regexValue.slice(1);
|
189
189
|
}
|
190
190
|
else if (regexValue.endsWith('$')) {
|
191
191
|
operator = 'endsWith';
|
192
|
-
regexValue.slice(0, -1);
|
192
|
+
regexValue = regexValue.slice(0, -1);
|
193
193
|
}
|
194
194
|
return {
|
195
195
|
field: key,
|