@insticc/react-datagrid-2 1.0.26 → 1.0.28
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/build/wrapper/index.js +2 -2
- package/package.json +1 -1
package/build/wrapper/index.js
CHANGED
|
@@ -194,14 +194,14 @@ var DataGrid = function DataGrid(_ref) {
|
|
|
194
194
|
grow: (_column$grow = column.grow) !== null && _column$grow !== void 0 ? _column$grow : true,
|
|
195
195
|
enableClickToCopy: (_column$enableClickTo = column.enableClickToCopy) !== null && _column$enableClickTo !== void 0 ? _column$enableClickTo : false,
|
|
196
196
|
enableColumnActions: (_column$enableColumnA = column.enableColumnActions) !== null && _column$enableColumnA !== void 0 ? _column$enableColumnA : false,
|
|
197
|
+
// sortingFn: --> basic default, datetime for date
|
|
197
198
|
sortingFn: column.isDateColumn ? function (rowA, rowB, columnId) {
|
|
198
199
|
var dateA = rowA.getValue(columnId) ? new Date(rowA.getValue(columnId)).getTime() : null;
|
|
199
200
|
var dateB = rowB.getValue(columnId) ? new Date(rowB.getValue(columnId)).getTime() : null;
|
|
200
201
|
if (dateA === null) return 1;
|
|
201
202
|
if (dateB === null) return -1;
|
|
202
203
|
return dateA - dateB; // Sort by timestamp
|
|
203
|
-
} :
|
|
204
|
-
// Use default sorting for non-date columns
|
|
204
|
+
} : 'basic',
|
|
205
205
|
Cell: function Cell(props) {
|
|
206
206
|
return column.cellClass ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
207
207
|
className: column.cellClass
|