feat: isChartOpen wird beim Öffnen des Chart-Modals gesetzt
- `setChartOpen(true)` in `handleOpenChartModal` hinzugefügt. - Redux-Import von `setChartOpen` in `Kue705FO.tsx` sichergestellt. - Dadurch bleibt `isChartOpen` nicht mehr `false`, wenn das Modal geöffnet wird. - Status wird nun korrekt aktualisiert, wenn `Messkurve` geklickt wird.
This commit is contained in:
@@ -26,12 +26,6 @@ const ChartSwitcher: React.FC<ChartSwitcherProps> = ({ isOpen, onClose }) => {
|
|||||||
onClose(); // Originale Schließen-Funktion aufrufen
|
onClose(); // Originale Schließen-Funktion aufrufen
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isOpen) {
|
|
||||||
dispatch(setChartOpen(true));
|
|
||||||
}
|
|
||||||
}, [isOpen]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ReactModal
|
<ReactModal
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ const LoopChartActionBar: React.FC = () => {
|
|||||||
const lastDate = new Date(jsonData[0].t);
|
const lastDate = new Date(jsonData[0].t);
|
||||||
dispatch(setVonDatum(firstDate.toISOString().split("T")[0]));
|
dispatch(setVonDatum(firstDate.toISOString().split("T")[0]));
|
||||||
dispatch(setBisDatum(lastDate.toISOString().split("T")[0]));
|
dispatch(setBisDatum(lastDate.toISOString().split("T")[0]));
|
||||||
dispatch(setChartOpen(true)); // Setze den Schalter auf "geöffnet"
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("Erwartetes Array, aber erhalten:", jsonData);
|
console.error("Erwartetes Array, aber erhalten:", jsonData);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import { setActiveMode } from "../../../../redux/slices/chartDataSlice";
|
|||||||
import LoopMeasurementChart from "./Charts/LoopMeasurementChart/LoopMeasurementChart";
|
import LoopMeasurementChart from "./Charts/LoopMeasurementChart/LoopMeasurementChart";
|
||||||
import TDRChart from "./Charts/TDRChart/TDRChart";
|
import TDRChart from "./Charts/TDRChart/TDRChart";
|
||||||
import handleButtonClick from "./kue705FO-Funktionen/handleButtonClick";
|
import handleButtonClick from "./kue705FO-Funktionen/handleButtonClick";
|
||||||
|
import { setChartOpen } from "../../../../redux/slices/kabelueberwachungChartSlice";
|
||||||
|
|
||||||
const Kue705FO: React.FC<Kue705FOProps> = ({
|
const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||||
isolationswert,
|
isolationswert,
|
||||||
@@ -96,6 +97,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
|||||||
|
|
||||||
const handleOpenChartModal = () => {
|
const handleOpenChartModal = () => {
|
||||||
setShowChartModal(true);
|
setShowChartModal(true);
|
||||||
|
dispatch(setChartOpen(true));
|
||||||
|
|
||||||
if (activeButton === "TDR") {
|
if (activeButton === "TDR") {
|
||||||
dispatch(setActiveMode("TDR"));
|
dispatch(setActiveMode("TDR"));
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.82";
|
const webVersion = "1.6.83";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
Reference in New Issue
Block a user