@topconsultnpm/sdkui-react-beta 6.15.85 → 6.15.87
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.
|
@@ -12,7 +12,7 @@ import TMTreeSelector from '../search/TMTreeSelector';
|
|
|
12
12
|
import TMPanel from '../../base/TMPanel';
|
|
13
13
|
import { TMPanelManagerProvider, useTMPanelManagerContext } from '../../layout/panelManager/TMPanelManagerContext';
|
|
14
14
|
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
15
|
-
const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [] }) => {
|
|
15
|
+
const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined, onSavedAsyncCallback, inputMids = [], onCurrentTIDChanged }) => {
|
|
16
16
|
const [currentTID, setCurrentTID] = useState(0);
|
|
17
17
|
const [mruTIDs, setMruTIDs] = useState([]);
|
|
18
18
|
const [currentMruTID, setCurrentMruTID] = useState(0);
|
|
@@ -24,6 +24,12 @@ const TMArchive = ({ inputTID, inputFile = null, connectorFileSave = undefined,
|
|
|
24
24
|
return;
|
|
25
25
|
setCurrentTID(inputTID);
|
|
26
26
|
}, [inputTID]);
|
|
27
|
+
// Notify parent when currentTID changes
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!onCurrentTIDChanged)
|
|
30
|
+
return;
|
|
31
|
+
onCurrentTIDChanged(currentTID);
|
|
32
|
+
}, [currentTID, onCurrentTIDChanged]);
|
|
27
33
|
useEffect(() => {
|
|
28
34
|
if (!currentTID || currentTID <= 0) {
|
|
29
35
|
return;
|