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

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.
@@ -317,7 +317,15 @@ class OdataProvider {
317
317
  if (!col.values || col.values.length === 0) {
318
318
  return '';
319
319
  }
320
- const equalsClauses = col.values.map((v) => me.odataOperator.equalsStr(colName, `'${me.encode(v)}'`, isCaseSensitiveStringFilter));
320
+ // Fill-cell / set-filter columns are always equality-matched against
321
+ // a fixed list of backend-provided values, so the casing on both
322
+ // sides is already known to match. Skip the tolower() wrap that the
323
+ // generic string operators apply — wrapping the column in tolower()
324
+ // forces a full scan because LOWER(col) cannot use any index, and
325
+ // SQL Server's default collation is already case-insensitive.
326
+ // Resulting predicate: `col eq 'Value'` (single) or
327
+ // `(col eq 'V1' or col eq 'V2')` (multi).
328
+ const equalsClauses = col.values.map((v) => me.odataOperator.equals(colName, `'${me.encode(v)}'`));
321
329
  return equalsClauses.length === 1
322
330
  ? equalsClauses[0]
323
331
  : `(${equalsClauses.join(' or ')})`;
@@ -2746,17 +2754,8 @@ class GridLibraryComponent {
2746
2754
  // Add timeout to prevent infinite loading
2747
2755
  const API_TIMEOUT = 800000; //80 seconds
2748
2756
  let hasRetried = false;
2749
- // Fill-cell columns use the set filter, which only emits exact-match
2750
- // predicates (eq / in). Wrapping those in tolower() forces the DB to
2751
- // scan + lowercase every row (non-sargable), which was making filter
2752
- // requests ~10x+ slower than baseline. Skip tolower() for these
2753
- // columns by registering them as caseSensitive with the provider.
2754
- const fillCellFields = (this.initialColumnDef ?? [])
2755
- .filter((c) => c?.columnType === 'fill' && c?.field)
2756
- .map((c) => c.field);
2757
2757
  this.odataProvider = new OdataServerSideProvider({
2758
2758
  isCaseSensitiveStringFilter: false,
2759
- caseSensitiveColumns: fillCellFields,
2760
2759
  callApi: (options) => {
2761
2760
  const url = this.setExternalFilters(options);
2762
2761
  console.log('Server-side API call:', url);