Skip to content

Commit 6aa1bda

Browse files
committed
2024-11-08 - non-recipient search
1 parent 48a2f35 commit 6aa1bda

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

web-ui/src/components/feedback_external_recipient_selector/NewExternalRecipientModal.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React, { useState, useEffect } from 'react';
22
import { Modal, TextField, Button, Box, IconButton } from '@mui/material';
33
import CloseIcon from '@mui/icons-material/Close';
44
import PropTypes from 'prop-types';
@@ -9,6 +9,15 @@ const NewExternalRecipientModal = ({ open, onClose, onSubmit }) => {
99
const [lastName, setLastName] = useState('');
1010
const [companyName, setCompanyName] = useState('');
1111

12+
useEffect(() => {
13+
if (open) {
14+
setEmail('');
15+
setFirstName('');
16+
setLastName('');
17+
setCompanyName('');
18+
}
19+
}, [open]);
20+
1221
const handleSubmit = () => {
1322
const newRecipient = {
1423
email,

0 commit comments

Comments
 (0)