Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
var FakeObjectDataListStore = require('../../examples/helpers/FakeObjectDataListStore');
var FixedDataTable = require('fixed-data-table-2');
var React = require('react');
var Constants = require('../Constants');
var Table = FixedDataTable.Table;
var Column = FixedDataTable.Column;
var Cell = FixedDataTable.Cell;
// Require common FixedDataTable CSS.
require('fixed-data-table-2/css/layout/ScrollbarLayout.css');
require('fixed-data-table-2/css/layout/fixedDataTableLayout.css');
require('fixed-data-table-2/css/layout/fixedDataTableCellLayout.css');
require('fixed-data-table-2/css/layout/fixedDataTableCellGroupLayout.css');
require('fixed-data-table-2/css/layout/fixedDataTableColumnResizerLineLayout.css');
require('fixed-data-table-2/css/layout/fixedDataTableRowLayout.css');
require('fixed-data-table-2/css/style/fixedDataTable.css');
require('fixed-data-table-2/css/style/fixedDataTableCell.css');
require('fixed-data-table-2/css/style/fixedDataTableColumnResizerLine.css');
require('fixed-data-table-2/css/style/fixedDataTableRow.css');
require('fixed-data-table-2/css/style/Scrollbar.css');
var dataList = new FakeObjectDataListStore();
grid = _this$props3.grid,
currentSortColumn = _this$props3.currentSortColumn,
currentSortOrder = _this$props3.currentSortOrder,
columns = _this$props3.columns,
column = _this$props3.column,
onSortChange = _this$props3.onSortChange,
isBusy = _this$props3.isBusy,
filtering = _this$props3.filtering,
width = _this$props3.width,
props = _objectWithoutPropertiesLoose(_this$props3, ["children", "grid", "currentSortColumn", "currentSortOrder", "columns", "column", "onSortChange", "isBusy", "filtering", "width"]);
var cellClassNames = (0, _classnames["default"])({
'oc-datagrid-cell-header': true,
clickable: !isBusy && _datagrid2["default"].isSortable(column)
});
return _react["default"].createElement(_fixedDataTable.Cell, _extends({
className: cellClassNames,
onClick: this.onSortChange
}, props), this.renderColumnHeader(), this.getFilteringComponent(filtering, column));
};