Skip to content

Commit

Permalink
col-resize pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrn committed Sep 6, 2020
1 parent a465941 commit d911dcb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/m-table-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import withStyles from "@material-ui/core/styles/withStyles";
import { Draggable } from "react-beautiful-dnd";
import { Tooltip } from "@material-ui/core";
import * as CommonValues from "../utils/common-values";
import equal from "fast-deep-equal";

/* eslint-enable no-unused-vars */

export class MTableHeader extends React.Component {
Expand All @@ -22,6 +24,10 @@ export class MTableHeader extends React.Component {
};
}

// shouldComponentUpdate(nextProps, nextState){
// return !equal(nextProps, this.props) || !equal(nextState, this.state);
// }

componentDidMount() {
document.addEventListener("mousemove", this.handleMouseMove);
document.addEventListener("mouseup", this.handleMouseUp);
Expand Down Expand Up @@ -176,7 +182,7 @@ export class MTableHeader extends React.Component {
<div></div>
<this.props.icons.Resize
style={{
cursor: "e-resize",
cursor: "col-resize",
color:
this.state.resizingColumnDef &&
this.state.resizingColumnDef.tableData.id ===
Expand Down Expand Up @@ -280,11 +286,6 @@ export class MTableHeader extends React.Component {
}

render() {
// const log = this.props.columns.map(c => c.field + ": " + c.tableData.width + ", " + c.tableData.initialWidth + ", " + c.tableData.additionalWidth).join('\r\n');
// console.log("===============================");
// console.log(log);
// console.log("===============================");

const headers = this.renderHeader();
if (this.props.hasSelection) {
headers.splice(0, 0, this.renderSelectionHeader());
Expand Down

0 comments on commit d911dcb

Please sign in to comment.