I have a modal that either displays a text message or a plot. Each time the button is clicked, when the modal initially opens, it shows the result of the previous time the button was clicked. Is there a way to erase the content when the button is clicked, or prevent the modal from showing until the new result is finished and ready to be displayed, so the outdated result is not shown ?
I have a modal that either displays a text message or a plot. Each time the button is clicked, when the modal initially opens, it shows the result of the previous time the button was clicked. Is there a way to erase the content when the button is clicked, or prevent the modal from showing until the new result is finished and ready to be displayed, so the outdated result is not shown ?