Improve guest names handling in RSVP form: - Fix initial guest name field editing - Properly initialize guest names array - Fix guest names persistence in edit mode - Enhance form behavior for guest count changes - Fix type handling and validation

This commit is contained in:
Starstrike
2025-05-01 18:05:49 -04:00
parent 6b3cf70534
commit 3df0169ee4

View File

@@ -469,10 +469,6 @@ const RSVPForm: React.FC = () => {
helperText={formData.guest_count < 1 ? "Number of guests must be at least 1" : ""}
/>
<Box sx={{ mt: 2 }}>
<Typography variant="subtitle1" gutterBottom>
Guest Names
</Typography>
{Array.from({ length: formData.guest_count }).map((_, index) => (
<TextField
key={index}
@@ -485,7 +481,6 @@ const RSVPForm: React.FC = () => {
required
/>
))}
</Box>
</>
)}