tabler-react-2 0.1.112 → 0.1.113
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.
package/dist/table/index.js
CHANGED
|
@@ -140,7 +140,7 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
140
140
|
var sortColumn = columns.find(function (col) {
|
|
141
141
|
return col.accessor === key;
|
|
142
142
|
});
|
|
143
|
-
var sortFunction = sortColumn.sortFn || defaultSortFn;
|
|
143
|
+
var sortFunction = (sortColumn === null || sortColumn === void 0 ? void 0 : sortColumn.sortFn) || defaultSortFn;
|
|
144
144
|
return _toConsumableArray(data).sort(function (a, b) {
|
|
145
145
|
var aValue = getValueByAccessor(a, key);
|
|
146
146
|
var bValue = getValueByAccessor(b, key);
|
|
@@ -171,7 +171,7 @@ var Table = exports.Table = function Table(_ref4) {
|
|
|
171
171
|
key: index,
|
|
172
172
|
className: "".concat(column.className || "", " ").concat(column.sortable ? "sortable" : ""),
|
|
173
173
|
onClick: column.sortable ? function () {
|
|
174
|
-
return handleSort(column.accessor, column.sortFn);
|
|
174
|
+
return handleSort(column.accessor, column === null || column === void 0 ? void 0 : column.sortFn);
|
|
175
175
|
} : undefined,
|
|
176
176
|
style: {
|
|
177
177
|
cursor: column.sortable ? "pointer" : "default"
|