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:
@@ -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>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user