fix: digital Input Modal show values
This commit is contained in:
@@ -16,6 +16,8 @@ export default function InputModal({ selectedInput, closeInputModal, isOpen }) {
|
||||
(input) => input.id === Number(selectedInput?.id)
|
||||
)
|
||||
);
|
||||
console.log("📦 selectedInput.id:", selectedInput?.id);
|
||||
console.log("📦 reduxInput:", reduxInput);
|
||||
|
||||
const [isInitialLoad, setIsInitialLoad] = useState(true);
|
||||
const [name, setName] = useState("");
|
||||
@@ -27,7 +29,7 @@ export default function InputModal({ selectedInput, closeInputModal, isOpen }) {
|
||||
|
||||
useEffect(() => {
|
||||
if (reduxInput && isInitialLoad) {
|
||||
setName(reduxInput.name || "");
|
||||
setName(reduxInput.label || "");
|
||||
setInvertiert(reduxInput.invertierung);
|
||||
setFilterzeit(reduxInput.filterzeit);
|
||||
setGewichtung(reduxInput.gewichtung);
|
||||
|
||||
Reference in New Issue
Block a user