@mikevar/data-grid 0.1.1 → 0.2.0
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/dist/index.cjs +3 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -219,7 +219,8 @@ function normalizeParsedQueryObject({
|
|
|
219
219
|
direction: isOrderDirection(direction) ? direction : "asc"
|
|
220
220
|
};
|
|
221
221
|
}).filter((item) => item !== null);
|
|
222
|
-
const
|
|
222
|
+
const rawFilters = parsedQuery.filtering.filters;
|
|
223
|
+
const filters = Object.entries(rawFilters).map(([colOperator, value]) => {
|
|
223
224
|
const [col, operator] = colOperator.split(COL_OPERATOR_SEPARATOR);
|
|
224
225
|
if (!col || !isFilterOperator(operator)) return null;
|
|
225
226
|
const column = col.trim();
|
|
@@ -238,6 +239,7 @@ function normalizeParsedQueryObject({
|
|
|
238
239
|
filtering: {
|
|
239
240
|
mode: isFilterMode(parsedQuery.filtering.mode) ? parsedQuery.filtering.mode : defaultValues.filtering.mode,
|
|
240
241
|
search: parsedQuery.filtering.search ?? defaultValues.filtering.search,
|
|
242
|
+
rawFilters,
|
|
241
243
|
filters
|
|
242
244
|
}
|
|
243
245
|
};
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -167,7 +167,8 @@ function normalizeParsedQueryObject({
|
|
|
167
167
|
direction: isOrderDirection(direction) ? direction : "asc"
|
|
168
168
|
};
|
|
169
169
|
}).filter((item) => item !== null);
|
|
170
|
-
const
|
|
170
|
+
const rawFilters = parsedQuery.filtering.filters;
|
|
171
|
+
const filters = Object.entries(rawFilters).map(([colOperator, value]) => {
|
|
171
172
|
const [col, operator] = colOperator.split(COL_OPERATOR_SEPARATOR);
|
|
172
173
|
if (!col || !isFilterOperator(operator)) return null;
|
|
173
174
|
const column = col.trim();
|
|
@@ -186,6 +187,7 @@ function normalizeParsedQueryObject({
|
|
|
186
187
|
filtering: {
|
|
187
188
|
mode: isFilterMode(parsedQuery.filtering.mode) ? parsedQuery.filtering.mode : defaultValues.filtering.mode,
|
|
188
189
|
search: parsedQuery.filtering.search ?? defaultValues.filtering.search,
|
|
190
|
+
rawFilters,
|
|
189
191
|
filters
|
|
190
192
|
}
|
|
191
193
|
};
|