@gisce/react-ooui 1.4.0 → 1.4.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoToResourceModal.d.ts","sourceRoot":"","sources":["GoToResourceModal.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"GoToResourceModal.d.ts","sourceRoot":"","sources":["GoToResourceModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAKlD,aAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,KAAK,sBA8D7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisce/react-ooui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@gisce/fiber-diagram": "^1.1.0-rc.3",
|
|
36
36
|
"@gisce/ooui": "^0.22.0",
|
|
37
37
|
"@gisce/react-formiga-components": "^1.0.9-rc.21",
|
|
38
|
-
"@gisce/react-formiga-table": "^0.8.
|
|
38
|
+
"@gisce/react-formiga-table": "^0.8.1",
|
|
39
39
|
"@monaco-editor/react": "^4.4.5",
|
|
40
40
|
"@tabler/icons-react": "^2.11.0",
|
|
41
41
|
"antd": "^5.5.2",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext } from "react";
|
|
1
|
+
import React, { useContext, useRef } from "react";
|
|
2
2
|
import { Button, Col, Form, InputNumber, Modal, Row, Space } from "antd";
|
|
3
3
|
import { CheckOutlined, CloseOutlined } from "@ant-design/icons";
|
|
4
4
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
@@ -15,6 +15,8 @@ export const GoToResourceModal = (props: Props) => {
|
|
|
15
15
|
|
|
16
16
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
17
17
|
|
|
18
|
+
const inputRef = useRef<null | HTMLElement>();
|
|
19
|
+
|
|
18
20
|
function handleSubmit(values: any) {
|
|
19
21
|
onIdSubmitted(values.id);
|
|
20
22
|
}
|
|
@@ -28,6 +30,7 @@ export const GoToResourceModal = (props: Props) => {
|
|
|
28
30
|
destroyOnClose
|
|
29
31
|
onCancel={onCancel}
|
|
30
32
|
maskClosable={false}
|
|
33
|
+
afterOpenChange={(open) => open && inputRef.current?.focus()}
|
|
31
34
|
>
|
|
32
35
|
<Form layout="vertical" onFinish={handleSubmit} autoComplete="off">
|
|
33
36
|
<Form.Item
|
|
@@ -40,7 +43,7 @@ export const GoToResourceModal = (props: Props) => {
|
|
|
40
43
|
},
|
|
41
44
|
]}
|
|
42
45
|
>
|
|
43
|
-
<InputNumber style={{ width: "100%" }} autoFocus />
|
|
46
|
+
<InputNumber style={{ width: "100%" }} autoFocus ref={inputRef as any}/>
|
|
44
47
|
</Form.Item>
|
|
45
48
|
<Row align="middle" justify="end">
|
|
46
49
|
<Col>
|