impact-ui 3.7.3-tableTest.2 → 3.7.4

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.
@@ -236,10 +236,6 @@ export const buildFilterModelEntry = (
236
236
  columnDef,
237
237
  operationType = null
238
238
  ) => {
239
- console.log("parsedValue", parsedValue);
240
- console.log("filterType", filterType);
241
- console.log("columnDef", columnDef);
242
- console.log("operationType", operationType);
243
239
  const type = columnDef?.type;
244
240
  const filter = columnDef?.filter;
245
241
  const operator = operationType || filterType;
@@ -271,42 +267,6 @@ export const buildFilterModelEntry = (
271
267
  return undefined;
272
268
  }
273
269
 
274
- // Handle array values (multi-select dropdowns)
275
- if (Array.isArray(parsedValue)) {
276
- const validValues = parsedValue.filter(
277
- (v) => v !== null && v !== undefined && v !== ""
278
- );
279
- if (validValues.length === 0) {
280
- return undefined;
281
- }
282
- // Single value in array — treat as simple filter
283
- if (validValues.length === 1) {
284
- return buildFilterModelEntry(
285
- String(validValues[0]),
286
- filterType,
287
- columnDef,
288
- operationType
289
- );
290
- }
291
- // Multiple values — use AG Grid's multi-condition format
292
- const filterTypeStr =
293
- filter === "agDateColumnFilter"
294
- ? "date"
295
- : filter === "agNumberColumnFilter" || type === "number"
296
- ? "number"
297
- : "text";
298
- const conditions = validValues.map((val) => ({
299
- filterType: filterTypeStr,
300
- type: operator,
301
- filter: String(val),
302
- }));
303
- return {
304
- filterType: filterTypeStr,
305
- operator: columnDef?.operator || "OR",
306
- conditions,
307
- };
308
- }
309
-
310
270
  // Handle date range values (object with startDate and endDate)
311
271
  if (
312
272
  filter === "agDateColumnFilter" &&
@@ -722,9 +722,7 @@ export const Table = forwardRef(
722
722
  }
723
723
 
724
724
  // Build filter model using utility function
725
- const filterModel = buildAdvanceSearchFilterModel(formValues, colDefs, actualRef?.current?.api);
726
-
727
- console.log("filterModel---->", filterModel);
725
+ const filterModel = buildAdvanceSearchFilterModel(formValues, colDefs);
728
726
 
729
727
  // Set filter model on AG Grid
730
728
  rest.api.setFilterModel(filterModel);
@@ -310,7 +310,9 @@ function AgGridHeader({
310
310
 
311
311
  return (
312
312
  <div
313
- className={`custom-ag-header-container ${rest?.column?.colDef?.checkboxSelection ? "checkbox-selection" : ""}`}
313
+ className={`custom-ag-header-container ${
314
+ rest?.column?.colDef?.checkboxSelection ? "checkbox-selection" : ""
315
+ }`}
314
316
  onClick={() => rest.onClick()}
315
317
  ref={containerRef}
316
318
  >
@@ -432,7 +434,10 @@ function AgGridHeader({
432
434
  rest?.column?.colDef?.sortable ? "sortable" : ""
433
435
  } ${enableHeaderTextWrap ? "header-wrap-enabled" : ""}`}
434
436
  >
435
- {rest?.column?.colDef?.field === "Selection" || rest?.column?.colDef?.checkboxSelection ? children : (
437
+ {rest?.column?.colDef?.field === "Selection" ||
438
+ rest?.column?.colDef?.checkboxSelection ? (
439
+ children
440
+ ) : (
436
441
  <div
437
442
  className="header-text-content"
438
443
  ref={headerTextRef}
@@ -1246,7 +1246,7 @@ export const RowSelect = {
1246
1246
  },
1247
1247
  { field: "make" },
1248
1248
  { field: "model" },
1249
- { field: "price" },
1249
+ { field: "price", type: "number", sortable: true },
1250
1250
  { field: "electric" },
1251
1251
  { field: "electric0" },
1252
1252
  { field: "electric1" },