feat(analogInputs): auto-load chart data when table row is selected
- Added useEffect to AnalogInputsChart to automatically trigger "Daten laden" when a row is selected and selectedAnalogInput.id is not 0. - Improves UX by syncing table selection with chart data fetch, no manual
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.630
|
NEXT_PUBLIC_APP_VERSION=1.6.631
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.630
|
NEXT_PUBLIC_APP_VERSION=1.6.631
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
|
## [1.6.631] – 2025-07-22
|
||||||
|
|
||||||
|
- Fix: Always show vonDatum and bisDatum in fetch URL for analog inputs chart
|
||||||
|
|
||||||
|
- Ensure local date state is never empty by falling back to default date if Redux is empty
|
||||||
|
- Prevent missing date values in fetch URL after multiple dropdown or button interactions
|
||||||
|
- Improves reliability of
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.630] – 2025-07-22
|
## [1.6.630] – 2025-07-22
|
||||||
|
|
||||||
- Fix: Preserve chart state during zoom, pan, and date changes
|
- Fix: Preserve chart state during zoom, pan, and date changes
|
||||||
|
|||||||
@@ -157,6 +157,14 @@ export default function AnalogInputsChart() {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Auto-trigger fetch when a row is selected and id is not 0 (only once per selection)
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (selectedAnalogInput?.id && selectedAnalogInput.id !== 0) {
|
||||||
|
handleFetchData();
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [selectedAnalogInput?.id]);
|
||||||
|
|
||||||
// ✅ Chart-Daten aus Redux filtern (Chart reagiert nur nach Button)
|
// ✅ Chart-Daten aus Redux filtern (Chart reagiert nur nach Button)
|
||||||
const chartKey = selectedAnalogInput?.id
|
const chartKey = selectedAnalogInput?.id
|
||||||
? String(selectedAnalogInput.id + 99)
|
? String(selectedAnalogInput.id + 99)
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.630",
|
"version": "1.6.631",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.630",
|
"version": "1.6.631",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.630",
|
"version": "1.6.631",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user