mig-schema-table 3.0.123 → 3.0.124
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.
|
@@ -51,6 +51,7 @@ function getIsColumnSortable(isTableSortable, propSchema, propConfig) {
|
|
|
51
51
|
(propSchema || (propConfig === null || propConfig === void 0 ? void 0 : propConfig.renderData) || (propConfig === null || propConfig === void 0 ? void 0 : propConfig.sort)));
|
|
52
52
|
}
|
|
53
53
|
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, settingsStorageKey, style, translate = defaultTranslate, useFilterStateHash, width, tableRef, }) {
|
|
54
|
+
var _a;
|
|
54
55
|
const [columnNames, setColumnNames] = React.useState();
|
|
55
56
|
const [resizeColumnIndex, setResizeColumnIndex] = React.useState(-1);
|
|
56
57
|
const [sortColumn, setSortColumn] = React.useState(defaultSortColumn);
|
|
@@ -710,6 +711,7 @@ function SchemaTable({ Heading = VariableSizeList, checkedIndexes, config, custo
|
|
|
710
711
|
backgroundColor: "#CCC",
|
|
711
712
|
alignItems: "center",
|
|
712
713
|
justifyContent: "center",
|
|
713
|
-
} }, { children: isDirty ? (_jsx("button", Object.assign({ onClick: refreshData, className: "btn border" }, { children: "Refresh data" }))) : (_jsx("div", { children: "\u231B Loading..." })) }))), isResizable ? (_jsx(ColumnResizers, { columnWidths: columnWidths, onColumnWidthsChange: onColumnWidthsChange, resizeColumnIndex: resizeColumnIndex, setResizeColumnIndex: setResizeColumnIndex, tableBodyHeight: tableBodyHeight })) : null] }))) : null, createPortal(thMenuConfig ? (_jsx(ThMenu, { isFilterable:
|
|
714
|
+
} }, { children: isDirty ? (_jsx("button", Object.assign({ onClick: refreshData, className: "btn border" }, { children: "Refresh data" }))) : (_jsx("div", { children: "\u231B Loading..." })) }))), isResizable ? (_jsx(ColumnResizers, { columnWidths: columnWidths, onColumnWidthsChange: onColumnWidthsChange, resizeColumnIndex: resizeColumnIndex, setResizeColumnIndex: setResizeColumnIndex, tableBodyHeight: tableBodyHeight })) : null] }))) : null, createPortal(thMenuConfig ? (_jsx(ThMenu, { isFilterable: isColumnFilterable &&
|
|
715
|
+
((_a = thMenuConfig.propConfig) === null || _a === void 0 ? void 0 : _a.isFilterable) !== false, isSortable: getIsColumnSortable(!!isSortable, schema.properties[thMenuConfig.propName], thMenuConfig.propConfig), onChange: onSchemaColumnFilterChange, onClose: onPopoverClose, onInputKeyDown: onInputKeyDown, propConfig: thMenuConfig.propConfig, propIsRequired: thMenuConfig.propIsRequired, propName: thMenuConfig.propName, propSchema: schema.properties[thMenuConfig.propName], referenceElement: thMenuConfig.referenceElement, setSortAsc: setSortAsc, setSortColumn: setSortColumn, translate: translate, value: columnFilterMap[thMenuConfig.propName] })) : null, document.body)] })));
|
|
714
716
|
}
|
|
715
717
|
export default React.memo(SchemaTable);
|