basesite-shared-grid-lib 21.0.1-beta.9 → 21.0.1-beta.91

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.
@@ -58,7 +58,7 @@ class GridLibraryService {
58
58
  this.baseUrl = 'https://fcems.intel.com/designhub/api';
59
59
  }
60
60
  else {
61
- this.baseUrl = 'https://fcemstest.intel.com/designhub/api';
61
+ this.baseUrl = 'https://fcelspx-test.intel.com/designhub/api';
62
62
  }
63
63
  }
64
64
  getColDef(gridId) {
@@ -2412,7 +2412,10 @@ class GridLibraryComponent {
2412
2412
  };
2413
2413
  }
2414
2414
  else if (res.columnType === 'fill') {
2415
- const valueLabelMap = this._buildFillValueLabelMap(res);
2415
+ const hasConfiguredValues = (Array.isArray(res.filterValues) && res.filterValues.length > 0) ||
2416
+ (typeof res.fieldValue === 'string' && res.fieldValue.trim() !== '') ||
2417
+ (Array.isArray(res.fieldValue) && res.fieldValue.length > 0);
2418
+ const valueLabelMap = hasConfiguredValues ? this._buildFillValueLabelMap(res) : null;
2416
2419
  return {
2417
2420
  width: 120,
2418
2421
  pinned: res.pinPosition,
@@ -2429,25 +2432,28 @@ class GridLibraryComponent {
2429
2432
  field: res.field,
2430
2433
  },
2431
2434
  filterable: res.filterable,
2432
- filter: 'agSetColumnFilter',
2433
- filterParams: {
2434
- // Provide the raw values from the backend config; OData provider
2435
- // handles case-insensitive matching server-side via tolower().
2436
- values: (params) => this._getFillFilterValues(res, params),
2437
- refreshValuesOnOpen: true,
2438
- // Open with nothing checked so a user picking one option triggers
2439
- // a single backend request instead of "uncheck all + pick one".
2440
- defaultToNothingSelected: true,
2441
- buttons: ['reset'],
2442
- // Pretty label for each checkbox; falls back to the value itself
2443
- valueFormatter: (p) => {
2444
- if (p?.value == null || p.value === '')
2445
- return p?.value;
2446
- return valueLabelMap?.get(String(p.value)) ?? p.value;
2435
+ filter: hasConfiguredValues ? 'agSetColumnFilter' : 'agTextColumnFilter',
2436
+ filterParams: hasConfiguredValues
2437
+ ? {
2438
+ values: (params) => this._getFillFilterValues(res, params),
2439
+ refreshValuesOnOpen: true,
2440
+ defaultToNothingSelected: true,
2441
+ buttons: ['reset'],
2442
+ valueFormatter: (p) => {
2443
+ if (p?.value == null || p.value === '')
2444
+ return p?.value;
2445
+ return valueLabelMap?.get(String(p.value)) ?? p.value;
2446
+ },
2447
+ textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
2448
+ }
2449
+ : {
2450
+ comparator: (filterLocalDateAtMidnight, cellValue) => {
2451
+ if (cellValue == null)
2452
+ return 0;
2453
+ return 0;
2454
+ },
2455
+ buttons: ['reset'],
2447
2456
  },
2448
- // Case-insensitive search within the dropdown's filter box
2449
- textFormatter: (v) => v == null ? '' : String(v).trim().toLowerCase(),
2450
- },
2451
2457
  };
2452
2458
  }
2453
2459
  else {