@lemon-fe/components 1.2.15 → 1.2.16
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.
|
@@ -16,7 +16,7 @@ export declare type SelectEditorParams = Pick<SelectProps<any, BaseOptionType>,
|
|
|
16
16
|
*/
|
|
17
17
|
action?: 'next' | 'stop' | 'none';
|
|
18
18
|
};
|
|
19
|
-
declare const _default: React.ForwardRefExoticComponent<ICellEditorParams<any, any, any> & Pick<SelectProps<any, BaseOptionType>, "disabled" | "
|
|
19
|
+
declare const _default: React.ForwardRefExoticComponent<ICellEditorParams<any, any, any> & Pick<SelectProps<any, BaseOptionType>, "disabled" | "allowClear" | "mode" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
|
|
20
20
|
fieldNames?: {
|
|
21
21
|
label: string;
|
|
22
22
|
value: string;
|
|
@@ -77,5 +77,13 @@ export interface SelectViewProps<RecordType, ParamsType> extends Pick<DataGridPr
|
|
|
77
77
|
* @default null
|
|
78
78
|
*/
|
|
79
79
|
header?: ReactElement | null;
|
|
80
|
+
/**
|
|
81
|
+
* @description 自定义已选择datagrid
|
|
82
|
+
*/
|
|
83
|
+
customSelectedGridProps?: DataGridProps<RecordType>;
|
|
84
|
+
/**
|
|
85
|
+
* @description 自定义主datagrid
|
|
86
|
+
*/
|
|
87
|
+
customDataGridProps?: DataGridProps<RecordType>;
|
|
80
88
|
}
|
|
81
89
|
export default function SelectView<RecordType extends Record<string | number, any>, ParamsType extends Record<string, any>>(originalProps: SelectViewProps<RecordType, ParamsType>): JSX.Element;
|
package/es/select-view/index.js
CHANGED
|
@@ -59,7 +59,9 @@ export default function SelectView(originalProps) {
|
|
|
59
59
|
_props$suppressRowCli = props.suppressRowClickSelection,
|
|
60
60
|
suppressRowClickSelection = _props$suppressRowCli === void 0 ? false : _props$suppressRowCli,
|
|
61
61
|
_props$rowMultiSelect = props.rowMultiSelectWithClick,
|
|
62
|
-
rowMultiSelectWithClick = _props$rowMultiSelect === void 0 ? true : _props$rowMultiSelect
|
|
62
|
+
rowMultiSelectWithClick = _props$rowMultiSelect === void 0 ? true : _props$rowMultiSelect,
|
|
63
|
+
customSelectedGridProps = props.customSelectedGridProps,
|
|
64
|
+
customDataGridProps = props.customDataGridProps;
|
|
63
65
|
var prefix = prefixClassName("select-view");
|
|
64
66
|
var _useState = useState(value || emptyValue),
|
|
65
67
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -229,7 +231,7 @@ export default function SelectView(originalProps) {
|
|
|
229
231
|
className: prefix('head')
|
|
230
232
|
}, headerNode), /*#__PURE__*/React.createElement("div", {
|
|
231
233
|
className: prefix('body')
|
|
232
|
-
}, /*#__PURE__*/React.createElement(DataGrid, {
|
|
234
|
+
}, /*#__PURE__*/React.createElement(DataGrid, _extends({
|
|
233
235
|
ref: list,
|
|
234
236
|
rowKey: rowKey,
|
|
235
237
|
rowSelection: {
|
|
@@ -257,7 +259,7 @@ export default function SelectView(originalProps) {
|
|
|
257
259
|
fetch: request,
|
|
258
260
|
pagination: pagination,
|
|
259
261
|
customColumnPanelStorage: customColumnPanelStorage
|
|
260
|
-
}))));
|
|
262
|
+
}, customDataGridProps)))));
|
|
261
263
|
};
|
|
262
264
|
var renderSelected = function renderSelected() {
|
|
263
265
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -266,7 +268,7 @@ export default function SelectView(originalProps) {
|
|
|
266
268
|
className: prefix('main')
|
|
267
269
|
}, /*#__PURE__*/React.createElement("div", {
|
|
268
270
|
className: prefix('body')
|
|
269
|
-
}, /*#__PURE__*/React.createElement(DataGrid, {
|
|
271
|
+
}, /*#__PURE__*/React.createElement(DataGrid, _extends({
|
|
270
272
|
dataSource: data,
|
|
271
273
|
defaultColDef: defaultColDef,
|
|
272
274
|
rowHeight: rowHeight,
|
|
@@ -282,13 +284,14 @@ export default function SelectView(originalProps) {
|
|
|
282
284
|
data: data,
|
|
283
285
|
dataKeys: dataKeys
|
|
284
286
|
}
|
|
285
|
-
}))));
|
|
287
|
+
}, customSelectedGridProps)))));
|
|
286
288
|
};
|
|
287
289
|
if (readOnly) {
|
|
288
290
|
content = renderSelected();
|
|
289
291
|
} else if (!multiple) {
|
|
290
292
|
content = renderList();
|
|
291
293
|
} else {
|
|
294
|
+
var _customSelectedGridPr, _customSelectedGridPr2;
|
|
292
295
|
content = /*#__PURE__*/React.createElement(Tabs, {
|
|
293
296
|
items: [{
|
|
294
297
|
key: 'list',
|
|
@@ -297,7 +300,7 @@ export default function SelectView(originalProps) {
|
|
|
297
300
|
}, {
|
|
298
301
|
key: 'selected',
|
|
299
302
|
label: parseLocalTemplate(SelectViewLocale.selectedDataText, {
|
|
300
|
-
length: data.length
|
|
303
|
+
length: (_customSelectedGridPr = customSelectedGridProps === null || customSelectedGridProps === void 0 || (_customSelectedGridPr2 = customSelectedGridProps.dataSource) === null || _customSelectedGridPr2 === void 0 ? void 0 : _customSelectedGridPr2.length) !== null && _customSelectedGridPr !== void 0 ? _customSelectedGridPr : data.length
|
|
301
304
|
}),
|
|
302
305
|
children: renderSelected()
|
|
303
306
|
}],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"registry": "https://registry.npmjs.org"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "37caaf402464a0549212f7f485de34103b53694f"
|
|
71
71
|
}
|