diff --git a/src/components/ui/editable-cell.tsx b/src/components/ui/editable-cell.tsx index 230d5c5..4dea4c2 100644 --- a/src/components/ui/editable-cell.tsx +++ b/src/components/ui/editable-cell.tsx @@ -29,10 +29,6 @@ export function EditableCell({ const [error, setError] = useState(null); const inputRef = useRef(null); - useEffect(() => { - setTempValue(String(value)); - }, [value]); - useEffect(() => { if (isEditing && inputRef.current) { inputRef.current.focus(); @@ -78,7 +74,7 @@ export function EditableCell({ if (!isEditing) { let display: string; if (type === "toggle") { - display = tempValue === "true" ? "✓ Attivo" : "✗ Disattivato"; + display = String(value) === "true" ? "✓ Attivo" : "✗ Disattivato"; } else { const raw = String(value); display = formatDisplay ? formatDisplay(raw) : raw || "—";