dtable-ui-component 5.3.10-beta → 5.3.10-beta2
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.
|
@@ -73,7 +73,7 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
73
73
|
if (readonly || !column || !column.editable || _dtableUtils.NOT_SUPPORT_EDIT_COLUMN_TYPE_MAP[column.type]) return false;
|
|
74
74
|
if (column.type === _dtableUtils.CellType.IMAGE || column.type === _dtableUtils.CellType.FILE) return Boolean(uploadFile);
|
|
75
75
|
return true;
|
|
76
|
-
}, [isSaving, uploadFile]);
|
|
76
|
+
}, [readonly, isSaving, uploadFile]);
|
|
77
77
|
const initRowData = (0, _react.useCallback)(() => {
|
|
78
78
|
setLoading(true);
|
|
79
79
|
setRow(defaultRow);
|
|
@@ -88,7 +88,7 @@ const RowExpandDialog = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
88
88
|
isChangedRef.current = isInsertingRow && Object.keys(defaultRow).length > 0;
|
|
89
89
|
setColumns(validColumns);
|
|
90
90
|
setLoading(false);
|
|
91
|
-
}, [isInsertingRow, checkEditable]);
|
|
91
|
+
}, [isInsertingRow, defaultColumns, defaultRow, checkEditable]);
|
|
92
92
|
const toggle = (0, _react.useCallback)(() => {
|
|
93
93
|
if (isSaving) return;
|
|
94
94
|
onToggle();
|
|
@@ -135,7 +135,8 @@ class RowExpandMultipleSelectEditor extends _react.default.Component {
|
|
|
135
135
|
};
|
|
136
136
|
this.renderOptions = () => {
|
|
137
137
|
const {
|
|
138
|
-
isEditorFocus
|
|
138
|
+
isEditorFocus,
|
|
139
|
+
classNamePrefix
|
|
139
140
|
} = this.props;
|
|
140
141
|
const options = this.getMultipleSelectList();
|
|
141
142
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -144,12 +145,17 @@ class RowExpandMultipleSelectEditor extends _react.default.Component {
|
|
|
144
145
|
onClick: this.onToggleSelect,
|
|
145
146
|
ref: ref => this.multipleSelectOptionsRef = ref,
|
|
146
147
|
className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor custom-select', {
|
|
147
|
-
'focus': isEditorFocus
|
|
148
|
+
'focus': isEditorFocus,
|
|
149
|
+
["".concat(classNamePrefix, "-select-editor")]: classNamePrefix
|
|
148
150
|
})
|
|
149
151
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
-
className:
|
|
152
|
+
className: (0, _classnames.default)('dtable-ui-row-expand-select-editor-inner', {
|
|
153
|
+
["".concat(classNamePrefix, "-select-editor-inner")]: classNamePrefix
|
|
154
|
+
})
|
|
151
155
|
}, /*#__PURE__*/_react.default.createElement("div", null, options.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
152
|
-
className:
|
|
156
|
+
className: (0, _classnames.default)('dtable-ui-row-expand-select-options', {
|
|
157
|
+
["".concat(classNamePrefix, "-select-editor-options")]: classNamePrefix
|
|
158
|
+
})
|
|
153
159
|
}, options)), /*#__PURE__*/_react.default.createElement("i", {
|
|
154
160
|
"aria-hidden": "true",
|
|
155
161
|
className: "dtable-font dtable-icon-down3"
|
|
@@ -196,7 +202,8 @@ class RowExpandMultipleSelectEditor extends _react.default.Component {
|
|
|
196
202
|
const {
|
|
197
203
|
column,
|
|
198
204
|
isSupportNewOption,
|
|
199
|
-
onAddNewOption
|
|
205
|
+
onAddNewOption,
|
|
206
|
+
classNamePrefix
|
|
200
207
|
} = this.props;
|
|
201
208
|
const {
|
|
202
209
|
showSelectPopover,
|
|
@@ -214,6 +221,7 @@ class RowExpandMultipleSelectEditor extends _react.default.Component {
|
|
|
214
221
|
value: value,
|
|
215
222
|
valueKey: this.key,
|
|
216
223
|
target: this.targetRef,
|
|
224
|
+
classNamePrefix: classNamePrefix,
|
|
217
225
|
onCommit: this.onChange,
|
|
218
226
|
isSupportNewOption: isSupportNewOption,
|
|
219
227
|
onAddNewOption: onAddNewOption,
|
|
@@ -206,7 +206,8 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
206
206
|
column,
|
|
207
207
|
valueKey,
|
|
208
208
|
isSupportNewOption,
|
|
209
|
-
target
|
|
209
|
+
target,
|
|
210
|
+
classNamePrefix
|
|
210
211
|
} = this.props;
|
|
211
212
|
const {
|
|
212
213
|
searchValue,
|
|
@@ -218,7 +219,9 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
218
219
|
// maxWidth = column.width > 200 ? column.width - 62 : 200 - 62
|
|
219
220
|
let maxWidth = isInModal ? 250 : (column === null || column === void 0 ? void 0 : column.width) > 200 ? column.width - 62 : 138;
|
|
220
221
|
const dom = /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
-
className: (0, _classnames.default)('dtable-ui-editor-container dtable-ui-select-editor-container', className
|
|
222
|
+
className: (0, _classnames.default)('dtable-ui-editor-container dtable-ui-select-editor-container', className, {
|
|
223
|
+
["".concat(classNamePrefix, "-select-editor-container")]: classNamePrefix
|
|
224
|
+
}),
|
|
222
225
|
ref: ref => this.ref = ref
|
|
223
226
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
224
227
|
className: "select-options-search"
|
|
@@ -276,7 +279,9 @@ class PCSelectEditor extends _react.default.Component {
|
|
|
276
279
|
target: target,
|
|
277
280
|
hideArrow: true,
|
|
278
281
|
fade: false,
|
|
279
|
-
className:
|
|
282
|
+
className: (0, _classnames.default)('dtable-ui dtable-ui-row-expand-select-editor-popover', {
|
|
283
|
+
["".concat(classNamePrefix, "-select-editor-popover")]: classNamePrefix
|
|
284
|
+
})
|
|
280
285
|
}, dom));
|
|
281
286
|
}
|
|
282
287
|
return dom;
|