@pisell/materials 1.0.222 → 1.0.224
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/table/Table/fields/search/Edit/index.js +1 -0
- package/es/components/table/hooks/useTransColumns.js +2 -1
- package/lib/components/table/Table/fields/search/Edit/index.js +1 -0
- package/lib/components/table/hooks/useTransColumns.js +6 -5
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ var Edit = function Edit(props, ref) {
|
|
|
17
17
|
trigger = _props$trigger === void 0 ? ["onPressEnter"] : _props$trigger,
|
|
18
18
|
others = _objectWithoutProperties(props, _excluded);
|
|
19
19
|
return /*#__PURE__*/React.createElement(Input, _extends({}, others, {
|
|
20
|
+
style: style,
|
|
20
21
|
prefix: /*#__PURE__*/React.createElement(SearchOutlined, null),
|
|
21
22
|
onChange: function onChange(e) {
|
|
22
23
|
if (trigger !== null && trigger !== void 0 && trigger.includes("onChange")) {
|
|
@@ -76,13 +76,14 @@ var useTransColumns = function useTransColumns(params) {
|
|
|
76
76
|
}, /*#__PURE__*/React.createElement("span", null, dom), /*#__PURE__*/React.createElement("span", null, children.length, " ", getText("table-column-group-records")));
|
|
77
77
|
}, [groupField, columns]);
|
|
78
78
|
var _columns = useMemo(function () {
|
|
79
|
+
var _newColumns$;
|
|
79
80
|
// 过滤掉不显示的列
|
|
80
81
|
var newColumns = columns.filter(function (item) {
|
|
81
82
|
return !(isBoolean(item.isShow) && !item.isShow);
|
|
82
83
|
});
|
|
83
84
|
|
|
84
85
|
// 分组后不展示拖拽排序
|
|
85
|
-
if (dragSort && !groupField) {
|
|
86
|
+
if (dragSort && !groupField && (newColumns === null || newColumns === void 0 ? void 0 : (_newColumns$ = newColumns[0]) === null || _newColumns$ === void 0 ? void 0 : _newColumns$.key) !== "__sort") {
|
|
86
87
|
newColumns.unshift({
|
|
87
88
|
key: "__sort",
|
|
88
89
|
width: 60,
|
|
@@ -51,6 +51,7 @@ var Edit = (props, ref) => {
|
|
|
51
51
|
import_input.default,
|
|
52
52
|
{
|
|
53
53
|
...others,
|
|
54
|
+
style,
|
|
54
55
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, null),
|
|
55
56
|
onChange: (e) => {
|
|
56
57
|
if (trigger == null ? void 0 : trigger.includes("onChange")) {
|
|
@@ -108,10 +108,11 @@ var useTransColumns = (params) => {
|
|
|
108
108
|
[groupField, columns]
|
|
109
109
|
);
|
|
110
110
|
const _columns = (0, import_react.useMemo)(() => {
|
|
111
|
+
var _a2;
|
|
111
112
|
let newColumns = columns.filter(
|
|
112
113
|
(item) => !((0, import_utils.isBoolean)(item.isShow) && !item.isShow)
|
|
113
114
|
);
|
|
114
|
-
if (dragSort && !groupField) {
|
|
115
|
+
if (dragSort && !groupField && ((_a2 = newColumns == null ? void 0 : newColumns[0]) == null ? void 0 : _a2.key) !== "__sort") {
|
|
115
116
|
newColumns.unshift({
|
|
116
117
|
key: "__sort",
|
|
117
118
|
width: 60,
|
|
@@ -119,7 +120,7 @@ var useTransColumns = (params) => {
|
|
|
119
120
|
});
|
|
120
121
|
}
|
|
121
122
|
return newColumns.map((col, index) => {
|
|
122
|
-
var
|
|
123
|
+
var _a3;
|
|
123
124
|
let position = "";
|
|
124
125
|
if (index === 0) {
|
|
125
126
|
position = "start";
|
|
@@ -132,11 +133,11 @@ var useTransColumns = (params) => {
|
|
|
132
133
|
fixed: "left",
|
|
133
134
|
width: 350,
|
|
134
135
|
render: (text, record) => {
|
|
135
|
-
var
|
|
136
|
+
var _a4;
|
|
136
137
|
if (record.__is_group && groupFieldRender) {
|
|
137
138
|
return groupFieldRender(text, record);
|
|
138
139
|
}
|
|
139
|
-
return ((
|
|
140
|
+
return ((_a4 = col == null ? void 0 : col.render) == null ? void 0 : _a4.call(col, text, record)) || text;
|
|
140
141
|
}
|
|
141
142
|
};
|
|
142
143
|
}
|
|
@@ -160,7 +161,7 @@ var useTransColumns = (params) => {
|
|
|
160
161
|
filterObj = (0, import_stringFilter.default)({ dataIndex: col.dataIndex });
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
|
-
if (((
|
|
164
|
+
if (((_a3 = col.filters) == null ? void 0 : _a3.length) > 0) {
|
|
164
165
|
filterObj = {
|
|
165
166
|
...(0, import_selectFilter.default)({
|
|
166
167
|
dataIndex: col.dataIndex,
|