mig-schema-table 3.0.57 → 3.0.58
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.
|
@@ -353,17 +353,17 @@ function SchemaTable({ Heading = VariableSizeList, checkedIndexes, disabledCheck
|
|
|
353
353
|
}, [isDataFunction]);
|
|
354
354
|
const SchemaTableTh = React.useCallback(({ style, index }) => {
|
|
355
355
|
const propName = columnNames[index];
|
|
356
|
+
const propSchema = (propName === SELECT_ALL_COLUMN_NAME
|
|
357
|
+
? { type: "boolean" }
|
|
358
|
+
: properties[propName]);
|
|
356
359
|
const propConfig = config ? config[propName] : undefined;
|
|
357
|
-
let columnFilterStatus = isColumnFilterable &&
|
|
360
|
+
let columnFilterStatus = isColumnFilterable && propSchema && (propConfig === null || propConfig === void 0 ? void 0 : propConfig.isFilterable) !== false
|
|
358
361
|
? EColumnFilterStatus.AVAILABLE
|
|
359
362
|
: EColumnFilterStatus.UNAVAILABLE;
|
|
360
363
|
if (columnFilterMap[propName] !== undefined) {
|
|
361
364
|
columnFilterStatus = EColumnFilterStatus.ACTIVE;
|
|
362
365
|
}
|
|
363
|
-
|
|
364
|
-
? { type: "boolean" }
|
|
365
|
-
: properties[propName]);
|
|
366
|
-
return (_jsx(Th, { isAllChecked: isAllRowsChecked, columnFilterStatus: columnFilterStatus, disableColumnFilter: disableColumnFilter, isSortable: !!isSortable, numberOfSelectedRows: checkedIndexes === null || checkedIndexes === void 0 ? void 0 : checkedIndexes.length, onSelectAllIndexesHandler: onSelectAllIndexesHandler, propConfig: propConfig, propIsRequired: required.includes(propName), propName: propName, schema: schema, setPopoverConfig: setPopoverConfig, setSortAsc: onSetSortAsc, setSortColumn: onSetSortColumn, sortAsc: sortColumn === propName ? sortAsc : undefined, style: style }));
|
|
366
|
+
return (_jsx(Th, { isAllChecked: isAllRowsChecked, columnFilterStatus: columnFilterStatus, disableColumnFilter: disableColumnFilter, isSortable: !!isSortable, numberOfSelectedRows: checkedIndexes === null || checkedIndexes === void 0 ? void 0 : checkedIndexes.length, onSelectAllIndexesHandler: onSelectAllIndexesHandler, propConfig: propConfig, propIsRequired: required.includes(propName), propName: propName, schema: propSchema, setPopoverConfig: setPopoverConfig, setSortAsc: onSetSortAsc, setSortColumn: onSetSortColumn, sortAsc: sortColumn === propName ? sortAsc : undefined, style: style }));
|
|
367
367
|
}, [
|
|
368
368
|
checkedIndexes === null || checkedIndexes === void 0 ? void 0 : checkedIndexes.length,
|
|
369
369
|
columnFilterMap,
|