@lemon-fe/components 0.1.33 → 0.1.39
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/es/SelectView/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, Key, ReactElement } from 'react';
|
|
2
|
+
import type { TableRowSelection } from 'antd/lib/table/interface';
|
|
2
3
|
import type { FilterItemType } from '../Filter/typings';
|
|
3
4
|
import type { ColumnType } from '../BaseTable/typings';
|
|
4
5
|
interface Props<RecordType, ParamsType> {
|
|
@@ -45,6 +46,7 @@ interface Props<RecordType, ParamsType> {
|
|
|
45
46
|
style?: CSSProperties;
|
|
46
47
|
}) => ReactElement;
|
|
47
48
|
};
|
|
49
|
+
rowSelection?: TableRowSelection<RecordType>;
|
|
48
50
|
}
|
|
49
51
|
export default function SelectView<RecordType, ParamsType extends Record<string, any>>(props: Props<RecordType, ParamsType>): JSX.Element;
|
|
50
52
|
export {};
|
package/es/SelectView/index.js
CHANGED
|
@@ -41,7 +41,8 @@ export default function SelectView(props) {
|
|
|
41
41
|
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
42
42
|
rowKey = props.rowKey,
|
|
43
43
|
filter = props.filter,
|
|
44
|
-
dataSource = props.dataSource
|
|
44
|
+
dataSource = props.dataSource,
|
|
45
|
+
rowSelection = props.rowSelection;
|
|
45
46
|
var prefixCls = "".concat(PREFIX_CLS, "-select-view");
|
|
46
47
|
|
|
47
48
|
var _useState = useState(value || []),
|
|
@@ -170,14 +171,14 @@ export default function SelectView(props) {
|
|
|
170
171
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
171
172
|
actionRef: list,
|
|
172
173
|
rowKey: rowKey,
|
|
173
|
-
rowSelection: {
|
|
174
|
+
rowSelection: _objectSpread({
|
|
174
175
|
type: multiple ? 'checkbox' : 'radio',
|
|
175
176
|
preserveSelectedRowKeys: true,
|
|
176
177
|
selectedRowKeys: dataKeys,
|
|
177
178
|
onChange: function onChange(keys, rows) {
|
|
178
179
|
return handleChangeData(keys, rows);
|
|
179
180
|
}
|
|
180
|
-
},
|
|
181
|
+
}, rowSelection),
|
|
181
182
|
onRow: function onRow(row) {
|
|
182
183
|
return {
|
|
183
184
|
onClick: function onClick() {
|
|
@@ -235,13 +236,13 @@ export default function SelectView(props) {
|
|
|
235
236
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
236
237
|
dataSource: data,
|
|
237
238
|
columns: selectedColumns,
|
|
238
|
-
rowSelection: {
|
|
239
|
+
rowSelection: _objectSpread({
|
|
239
240
|
preserveSelectedRowKeys: true,
|
|
240
241
|
selectedRowKeys: selectedKeys,
|
|
241
242
|
onChange: function onChange(_, rows) {
|
|
242
243
|
return setSelected(rows);
|
|
243
244
|
}
|
|
244
|
-
},
|
|
245
|
+
}, rowSelection),
|
|
245
246
|
rowKey: rowKey
|
|
246
247
|
}))))));
|
|
247
248
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
6
|
"homepage": "",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"react": "^17.0.2",
|
|
42
42
|
"react-dom": "^17.0.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "2236e4c1e4669264f267723a9f22f1e2f740a263"
|
|
45
45
|
}
|