dtable-ui-component 6.0.29-beta8 → 6.0.29-beta9
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.
|
@@ -40,9 +40,7 @@ class MBCheckboxEditor extends _react.Component {
|
|
|
40
40
|
this.setState({
|
|
41
41
|
value: newValue
|
|
42
42
|
}, () => {
|
|
43
|
-
|
|
44
|
-
this.props.onCommit(event);
|
|
45
|
-
}
|
|
43
|
+
this.props.onCommit && this.props.onCommit(newValue);
|
|
46
44
|
});
|
|
47
45
|
};
|
|
48
46
|
this.renderIcon = (symbol, color) => {
|
|
@@ -12,10 +12,8 @@ require("./index.css");
|
|
|
12
12
|
class RowExpandMBCheckboxEditor extends _react.default.Component {
|
|
13
13
|
constructor(props) {
|
|
14
14
|
super(props);
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
const newValue = this.editor.getValue();
|
|
18
|
-
this.props.onCommit(newValue);
|
|
15
|
+
this.onCommit = newValue => {
|
|
16
|
+
this.props.onCommit && this.props.onCommit(newValue);
|
|
19
17
|
};
|
|
20
18
|
this.editor = null;
|
|
21
19
|
}
|
|
@@ -28,11 +26,10 @@ class RowExpandMBCheckboxEditor extends _react.default.Component {
|
|
|
28
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
27
|
className: (0, _classnames.default)('dtable-ui-mobile-row-expand-checkbox-editor-container', className)
|
|
30
28
|
}, /*#__PURE__*/_react.default.createElement(_CheckboxEditor.default, {
|
|
31
|
-
ref: ref => this.editor = ref,
|
|
32
29
|
className: "dtable-ui-row-expand-checkbox-editor mt-0",
|
|
33
30
|
column: column,
|
|
34
31
|
value: value,
|
|
35
|
-
onCommit: this.
|
|
32
|
+
onCommit: this.onCommit
|
|
36
33
|
}));
|
|
37
34
|
}
|
|
38
35
|
}
|
|
@@ -11,16 +11,14 @@ var _constants = require("../../constants");
|
|
|
11
11
|
class RowExpandPCCheckboxEditor extends _react.default.Component {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
|
-
this.
|
|
14
|
+
this.onCommit = newValue => {
|
|
15
15
|
const {
|
|
16
|
-
columnIndex
|
|
16
|
+
columnIndex,
|
|
17
|
+
updateTabIndex,
|
|
18
|
+
onCommit
|
|
17
19
|
} = this.props;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.props.updateTabIndex(columnIndex);
|
|
21
|
-
}
|
|
22
|
-
const newValue = this.editor.getValue();
|
|
23
|
-
this.props.onCommit(newValue);
|
|
20
|
+
updateTabIndex && updateTabIndex(columnIndex);
|
|
21
|
+
onCommit && onCommit(newValue);
|
|
24
22
|
};
|
|
25
23
|
}
|
|
26
24
|
render() {
|
|
@@ -30,12 +28,11 @@ class RowExpandPCCheckboxEditor extends _react.default.Component {
|
|
|
30
28
|
value
|
|
31
29
|
} = this.props;
|
|
32
30
|
return /*#__PURE__*/_react.default.createElement(_CheckboxEditor.default, {
|
|
33
|
-
ref: ref => this.editor = ref,
|
|
34
31
|
className: "dtable-ui-row-expand-checkbox-editor mt-2",
|
|
35
32
|
column: column,
|
|
36
33
|
value: value,
|
|
37
34
|
style: isEditorFocus ? _constants.ROW_EXPAND_FOCUS_STYLE : {},
|
|
38
|
-
onCommit: this.
|
|
35
|
+
onCommit: this.onCommit
|
|
39
36
|
});
|
|
40
37
|
}
|
|
41
38
|
}
|