Add key to list items

This commit is contained in:
Franck Royer 2021-06-18 15:18:05 +10:00
parent c6f73199cb
commit f05e3a6bb3
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4

View File

@ -46,7 +46,11 @@ export function SendMessage(props: Props) {
}; };
const items = Array.from(props.recipients.keys()).map((recipient) => { const items = Array.from(props.recipients.keys()).map((recipient) => {
return <MenuItem value={recipient}>{recipient}</MenuItem>; return (
<MenuItem key={recipient} value={recipient}>
{recipient}
</MenuItem>
);
}); });
const keyDownHandler = async (event: KeyboardEvent<HTMLInputElement>) => { const keyDownHandler = async (event: KeyboardEvent<HTMLInputElement>) => {