@douyinfe/semi-foundation 2.31.0 → 2.31.2-alpha.0
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.
- package/lib/cjs/table/utils.js +6 -0
- package/lib/es/table/utils.js +5 -0
- package/package.json +2 -2
- package/table/utils.ts +5 -0
package/lib/cjs/table/utils.js
CHANGED
|
@@ -131,6 +131,12 @@ function mergeColumns() {
|
|
|
131
131
|
let deep = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
132
132
|
const finalColumns = [];
|
|
133
133
|
const clone = deep ? cloneDeep : _clone2.default;
|
|
134
|
+
|
|
135
|
+
if (deep) {
|
|
136
|
+
const logger = new _Logger.default('[@douyinfe/semi-ui Table]');
|
|
137
|
+
logger.warn('Should not deep merge columns from foundation since columns may have react elements. Merge columns deep from semi-ui');
|
|
138
|
+
}
|
|
139
|
+
|
|
134
140
|
(0, _map2.default)(newColumns, newColumn => {
|
|
135
141
|
newColumn = Object.assign({}, newColumn);
|
|
136
142
|
const key = getColumnKey(newColumn, keyPropNames);
|
package/lib/es/table/utils.js
CHANGED
|
@@ -67,6 +67,11 @@ export function mergeColumns() {
|
|
|
67
67
|
const finalColumns = [];
|
|
68
68
|
const clone = deep ? cloneDeep : _clone;
|
|
69
69
|
|
|
70
|
+
if (deep) {
|
|
71
|
+
const logger = new Logger('[@douyinfe/semi-ui Table]');
|
|
72
|
+
logger.warn('Should not deep merge columns from foundation since columns may have react elements. Merge columns deep from semi-ui');
|
|
73
|
+
}
|
|
74
|
+
|
|
70
75
|
_map(newColumns, newColumn => {
|
|
71
76
|
newColumn = Object.assign({}, newColumn);
|
|
72
77
|
const key = getColumnKey(newColumn, keyPropNames);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.31.0",
|
|
3
|
+
"version": "2.31.2-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "b502692ae72f3cb550595912d9caefe0517c52c6",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/table/utils.ts
CHANGED
|
@@ -65,6 +65,11 @@ export function mergeColumns(oldColumns: any[] = [], newColumns: any[] = [], key
|
|
|
65
65
|
const finalColumns: any[] = [];
|
|
66
66
|
const clone = deep ? cloneDeep : lodashClone;
|
|
67
67
|
|
|
68
|
+
if (deep) {
|
|
69
|
+
const logger = new Logger('[@douyinfe/semi-ui Table]');
|
|
70
|
+
logger.warn('Should not deep merge columns from foundation since columns may have react elements. Merge columns deep from semi-ui');
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
map(newColumns, newColumn => {
|
|
69
74
|
newColumn = { ...newColumn };
|
|
70
75
|
const key = getColumnKey(newColumn, keyPropNames);
|