@lemon-fe/components 1.4.13 → 1.4.14-alpha.1
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/data-grid/index.d.ts +1 -1
- package/es/popup/index.js +9 -3
- package/package.json +3 -3
package/es/data-grid/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const Editors: {
|
|
|
17
17
|
Text: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
|
|
18
18
|
Date: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
|
|
19
19
|
Number: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
|
|
20
|
-
Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "
|
|
20
|
+
Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
|
|
21
21
|
fieldNames?: {
|
|
22
22
|
label: string;
|
|
23
23
|
value: string;
|
package/es/popup/index.js
CHANGED
|
@@ -62,6 +62,7 @@ function Popup(props) {
|
|
|
62
62
|
open = _useState4[0],
|
|
63
63
|
setOpen = _useState4[1];
|
|
64
64
|
var inputRef = useRef(null);
|
|
65
|
+
var wrapperRef = useRef(null);
|
|
65
66
|
var closeAction = useRef();
|
|
66
67
|
var shouldModalOpen = openProp !== null && openProp !== void 0 ? openProp : open;
|
|
67
68
|
useEffect(function () {
|
|
@@ -75,11 +76,14 @@ function Popup(props) {
|
|
|
75
76
|
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
76
77
|
getPrefixCls = _useContext.getPrefixCls;
|
|
77
78
|
var handleCancel = function handleCancel() {
|
|
78
|
-
var _inputRef$current;
|
|
79
79
|
setOpen(false);
|
|
80
80
|
onOpenChange === null || onOpenChange === void 0 || onOpenChange(false);
|
|
81
81
|
onCancel === null || onCancel === void 0 || onCancel();
|
|
82
|
-
(
|
|
82
|
+
if (inputRef.current !== null) {
|
|
83
|
+
inputRef.current.focus();
|
|
84
|
+
} else if (wrapperRef.current !== null) {
|
|
85
|
+
wrapperRef.current.focus();
|
|
86
|
+
}
|
|
83
87
|
};
|
|
84
88
|
var handleOpen = /*#__PURE__*/function () {
|
|
85
89
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -257,7 +261,9 @@ function Popup(props) {
|
|
|
257
261
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
258
262
|
className: prefix('wrapper'),
|
|
259
263
|
onClick: handleOpen,
|
|
260
|
-
role: "button"
|
|
264
|
+
role: "button",
|
|
265
|
+
ref: wrapperRef,
|
|
266
|
+
tabIndex: -1
|
|
261
267
|
}, trigger), modalElm);
|
|
262
268
|
}
|
|
263
269
|
export default Popup;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.14-alpha.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@dnd-kit/core": ">=6.0.0",
|
|
24
|
-
"@lemon-fe/hooks": "^1.4.
|
|
24
|
+
"@lemon-fe/hooks": "^1.4.14-alpha.1",
|
|
25
25
|
"@lemon-fe/utils": "^1.3.0",
|
|
26
26
|
"ag-grid-community": "29.2.0",
|
|
27
27
|
"ag-grid-enterprise": "29.2.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"registry": "https://registry.npmjs.org"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "57033c6a96c4e184fb28b629aa7318525fd6bbd3"
|
|
62
62
|
}
|