@gisce/react-ooui 1.1.12 → 1.1.13-rc.0
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/dist/react-ooui.es.js +12 -9
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +15 -15
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/views/actionViews/TreeActionView.tsx +10 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeActionView.d.ts","sourceRoot":"","sources":["TreeActionView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"TreeActionView.d.ts","sourceRoot":"","sources":["TreeActionView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AASnD,oBAAY,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,mBAAmB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,cAAc,EAAE,IAAI,EAAE,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,mBAAmB,uBA2DxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,11 @@ import TreeActionBar from "@/actionbar/TreeActionBar";
|
|
|
2
2
|
import { FormView, TreeView, View } from "@/types";
|
|
3
3
|
import TitleHeader from "@/ui/TitleHeader";
|
|
4
4
|
import SearchTree from "@/widgets/views/SearchTree";
|
|
5
|
-
import React from "react";
|
|
5
|
+
import React, { useContext } from "react";
|
|
6
|
+
import {
|
|
7
|
+
ActionViewContext,
|
|
8
|
+
ActionViewContextType,
|
|
9
|
+
} from "@/context/ActionViewContext";
|
|
6
10
|
|
|
7
11
|
export type TreeActionViewProps = {
|
|
8
12
|
formView?: FormView;
|
|
@@ -38,6 +42,10 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
38
42
|
searchTreeNameSearch,
|
|
39
43
|
} = props;
|
|
40
44
|
|
|
45
|
+
const { currentView, setPreviousView } = useContext(
|
|
46
|
+
ActionViewContext
|
|
47
|
+
) as ActionViewContextType;
|
|
48
|
+
|
|
41
49
|
if (!visible) {
|
|
42
50
|
return null;
|
|
43
51
|
}
|
|
@@ -66,6 +74,7 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
66
74
|
const itemIndex = results.findIndex((item: any) => {
|
|
67
75
|
return item.id === id;
|
|
68
76
|
});
|
|
77
|
+
setPreviousView?.(currentView);
|
|
69
78
|
setCurrentItemIndex(itemIndex);
|
|
70
79
|
const formView = availableViews.find(
|
|
71
80
|
(v) => v.type === "form"
|