Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Causes UI to stop responding to state changes #725

Open
KTPenrose opened this issue Jul 17, 2023 · 0 comments
Open

Causes UI to stop responding to state changes #725

KTPenrose opened this issue Jul 17, 2023 · 0 comments

Comments

@KTPenrose
Copy link

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} ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant