mig-schema-table 3.0.101 → 3.0.102

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.
@@ -46,6 +46,7 @@ function getSortByValue(propSchema, propConfig) {
46
46
  }
47
47
  function getIsColumnSortable(isTableSortable, propSchema, propConfig) {
48
48
  return !!(isTableSortable &&
49
+ (propConfig === null || propConfig === void 0 ? void 0 : propConfig.isSortable) !== false &&
49
50
  (propSchema || (propConfig === null || propConfig === void 0 ? void 0 : propConfig.renderData) || (propConfig === null || propConfig === void 0 ? void 0 : propConfig.sort)));
50
51
  }
51
52
  function SchemaTable({ Heading = VariableSizeList, checkedIndexes, config, customElement, data, defaultColumnFilters = {}, defaultSortAsc = false, defaultSortColumn, disabledCheckedIndexes, enableAutoFocus = true, enableRowCounter = true, getRowClassName, getRowSelected, isColumnFilterable = true, isExportable = true, isResizable = true, isSearchable = true, isSortable = true, maxHeight, onCheckedIndexesChange, onRowClick, onRowDoubleClick, onSearchEnter, rowHeight = 36, schema, searchPlaceholder, style, translate = defaultTranslate, useFilterStateHash, width, }) {
@@ -312,6 +313,10 @@ function SchemaTable({ Heading = VariableSizeList, checkedIndexes, config, custo
312
313
  // fall through
313
314
  default:
314
315
  // fallback by looking at the render value
316
+ if (propSchema === null || propSchema === void 0 ? void 0 : propSchema.enum) {
317
+ result = rawValue === columnFilterValue;
318
+ return;
319
+ }
315
320
  result = `${item[propName]}`
316
321
  .toLowerCase()
317
322
  .includes(`${columnFilterValue}`.toLowerCase());
package/dist/types.d.ts CHANGED
@@ -16,7 +16,7 @@ export interface IColumnConfig<T> {
16
16
  showTimezones?: false;
17
17
  sort?: (a: T, b: T, sortAsc: boolean) => number;
18
18
  sortByValue?: boolean;
19
- sortable?: boolean;
19
+ isSortable?: boolean;
20
20
  title?: string | React.ReactElement;
21
21
  width?: number;
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mig-schema-table",
3
- "version": "3.0.101",
3
+ "version": "3.0.102",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/"