basesite-shared-grid-lib 21.0.0-beta.6 → 21.0.0-beta.7
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.
|
Binary file
|
|
@@ -2432,7 +2432,10 @@ class GridLibraryComponent {
|
|
|
2432
2432
|
};
|
|
2433
2433
|
}
|
|
2434
2434
|
else if (res.columnType === 'fill') {
|
|
2435
|
-
const
|
|
2435
|
+
const hasConfiguredValues = (Array.isArray(res.filterValues) && res.filterValues.length > 0) ||
|
|
2436
|
+
(typeof res.fieldValue === 'string' && res.fieldValue.trim() !== '') ||
|
|
2437
|
+
(Array.isArray(res.fieldValue) && res.fieldValue.length > 0);
|
|
2438
|
+
const valueLabelMap = hasConfiguredValues ? this._buildFillValueLabelMap(res) : null;
|
|
2436
2439
|
return {
|
|
2437
2440
|
width: 120,
|
|
2438
2441
|
pinned: res.pinPosition,
|
|
@@ -2449,25 +2452,28 @@ class GridLibraryComponent {
|
|
|
2449
2452
|
field: res.field,
|
|
2450
2453
|
},
|
|
2451
2454
|
filterable: res.filterable,
|
|
2452
|
-
filter: 'agSetColumnFilter',
|
|
2453
|
-
filterParams:
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2455
|
+
filter: hasConfiguredValues ? 'agSetColumnFilter' : 'agTextColumnFilter',
|
|
2456
|
+
filterParams: hasConfiguredValues
|
|
2457
|
+
? {
|
|
2458
|
+
values: (params) => this._getFillFilterValues(res, params),
|
|
2459
|
+
refreshValuesOnOpen: true,
|
|
2460
|
+
defaultToNothingSelected: true,
|
|
2461
|
+
buttons: ['reset'],
|
|
2462
|
+
valueFormatter: (p) => {
|
|
2463
|
+
if (p?.value == null || p.value === '')
|
|
2464
|
+
return p?.value;
|
|
2465
|
+
return valueLabelMap?.get(String(p.value)) ?? p.value;
|
|
2466
|
+
},
|
|
2467
|
+
textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
|
|
2468
|
+
}
|
|
2469
|
+
: {
|
|
2470
|
+
comparator: (filterLocalDateAtMidnight, cellValue) => {
|
|
2471
|
+
if (cellValue == null)
|
|
2472
|
+
return 0;
|
|
2473
|
+
return 0;
|
|
2474
|
+
},
|
|
2475
|
+
buttons: ['reset'],
|
|
2467
2476
|
},
|
|
2468
|
-
// Case-insensitive search within the dropdown's filter box
|
|
2469
|
-
textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
|
|
2470
|
-
},
|
|
2471
2477
|
};
|
|
2472
2478
|
}
|
|
2473
2479
|
else {
|