Files
CPLv4.0/docs/components/main/analogInputs/AnalogInputsTable.md

53 lines
1.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- /docs/components/main/analogInputs/AnalogInputsTable.md -->
# 🧮 AnalogInputsTable
Die Komponente `AnalogInputsTable` zeigt eine Tabelle mit allen verfügbaren analogen Eingängen an, einschließlich Messwert, Einheit und Bezeichnung.
---
## ⚙️ Funktion
- Ruft beim Laden die Liste der analogen Eingänge aus dem Redux-Store über `getAnalogInputsThunk()` ab.
- Zeigt alle Eingänge in einer Tabelle mit folgenden Spalten:
- Eingang (ID)
- Messwert
- Einheit
- Bezeichnung
- Aktion (Zahnrad-Icon zur Konfiguration)
---
## 🔄 Interaktion
- Beim Klick auf eine Tabellenzeile:
- Wird der Eingang als aktiv markiert (`activeId`)
- `setSelectedId` wird gesetzt → z.B. für Diagrammanzeige
- Beim Klick auf das ⚙️-Icon:
- `setSelectedInput` wird mit dem aktuellen Objekt befüllt
- Das Einstellungs-Modal (`AnalogInputsSettingsModal`) wird geöffnet
---
## 📦 Technologien
- `react-redux` für Zustand und Datenabruf
- `@iconify/react` für Icons (z.B. `mdi/waveform`, `mdi/settings`)
- Tailwind CSS für Styling und Layout
- Typ `AnalogInput` zur Definition der Eingangsdatenstruktur
---
## 🧪 Besonderheiten
- `unit` ist optional wird als `"-"` angezeigt, wenn nicht vorhanden
- Die Auswahlfarbe der Zeile (hellblau) zeigt den aktiven Eingang an
- Mobilfreundlich durch `overflow-x-auto` und responsives Tailwind-Layout
---
## 🔍 Hinweise
- Die `label`-, `value`- und `unit`-Werte stammen direkt aus dem Redux-State `analogInputs`
- Eingänge ohne `id` oder `label` werden gefiltert