react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Causes UI to stop responding to state changes

Open KTPenrose opened this issue 2 years ago • 1 comments

I have a MaterialTable that is bound to a state variable that contains an array. It works beautifully, until I make the container dialog draggable.

... const [attachments, setAttachments] = useState([]); ... const onOkAttachmentHandler = (file) => { //add attachment if (file !== null) { let attachment = { ownerId: props.entityId, labId: props.labId, filename: file.name, file: file, archive: false }; setAttachments((previousAttachments) => { let newList = [...previousAttachments, attachment]; return newList; }); props.attachmentAdded(attachment); } setAddAttachmentDialogVisible(false); } ... <MaterialTable title="Attachments" data={attachments} ...

KTPenrose avatar Jul 17 '23 16:07 KTPenrose