Skip to content

Commit a59d5c3

Browse files
committed
Fixed an issue when clicking "line Number cell" did not start the next task.
1 parent faca4f2 commit a59d5c3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/axui-datagrid/components/DataGridBody.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class DataGridBody extends React.Component<IProps> {
5858
} = styles;
5959

6060
const startMousePosition = getMousePosition(e);
61-
const spanType = e.currentTarget.getAttribute('data-span');
61+
const spanType = e.target['getAttribute']('data-span');
6262
const rootNode = getNode(getRootNode);
6363
const { x: leftPadding = 0, y: topPadding = 0 } =
6464
rootNode && (rootNode.getBoundingClientRect() as any);
@@ -342,7 +342,7 @@ class DataGridBody extends React.Component<IProps> {
342342
document.addEventListener('mouseleave', offEvent);
343343
}
344344
};
345-
const procClickLinenumber = () => {
345+
const procClickLineNumber = () => {
346346
let state = {
347347
dragging: false,
348348
selectionRows: {},
@@ -398,7 +398,7 @@ class DataGridBody extends React.Component<IProps> {
398398

399399
switch (spanType) {
400400
case 'lineNumber':
401-
procClickLinenumber();
401+
procClickLineNumber();
402402
break;
403403
case 'rowSelector':
404404
procClickRowSelector();

src/axui-datagrid/components/DataGridBodyCell.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const CellLabel: React.SFC<{
1313
}> = props => {
1414
const { col, list: data, li, lineHeight, predefinedFormatter } = props;
1515
const { key = '', columnAttr = '', formatter } = col;
16-
17-
let formatterData = {
16+
const formatterData = {
1817
data,
1918
item: data[li],
2019
index: li,

0 commit comments

Comments
 (0)