@ai-table/grid 0.1.19 → 0.1.20

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.
@@ -29,7 +29,7 @@ import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, is
29
29
  import ObjectID from 'bson-objectid';
30
30
  import { customAlphabet } from 'nanoid';
31
31
  import * as _ from 'lodash';
32
- import { isNumber, includes, values, isString, isObject } from 'lodash';
32
+ import ___default, { isNumber, includes, values, isString, isObject } from 'lodash';
33
33
  import * as i1 from '@angular/forms';
34
34
  import { FormsModule } from '@angular/forms';
35
35
  import { ThyDatePicker, ThyDatePickerFormatPipe } from 'ngx-tethys/date-picker';
@@ -10381,10 +10381,9 @@ class AITableGrid extends AITableGridBase {
10381
10381
  allFieldOptions.push(fieldConfig.fieldOption);
10382
10382
  }
10383
10383
  });
10384
- const fieldOptionMap = new Map(allFieldOptions.map((fieldOption) => [fieldOption.type, fieldOption]));
10385
- const fieldOptionKeys = this.aiTable.context?.aiFieldConfig()?.fieldOptionKeys || [];
10386
- if (fieldOptionKeys.length > 0) {
10387
- allFieldOptions = fieldOptionKeys.map((fieldOptionKey) => fieldOptionMap.get(fieldOptionKey));
10384
+ const filterFieldOptions = this.aiTable.context?.aiFieldConfig()?.filterFieldOptions;
10385
+ if (___default.isFunction(filterFieldOptions)) {
10386
+ allFieldOptions = filterFieldOptions(allFieldOptions);
10388
10387
  }
10389
10388
  return allFieldOptions;
10390
10389
  });