Hello! I am trying to figure out how to add a refresh button to an issue glance. My app is fetching data from a 3rd party API and displaying the information in an issue glance. I would like to be able to click a refresh button and reload all the data in an issue glance. Is this possible with forge?
Just to confirm, is this app already running in Forge? Have you built it so that it already shows data in an issue glance and you’re looking only for ideas on how to add a
That is correct see my attached screenshot. I added a simple button for a refresh but I am unsure on how to re-render the data so if I change a value on the 3rd party API and click refresh on the app, it will display the new data without having to refresh the webpage as a whole.
Is there a way to refresh the issue glance as a whole with a button? Similar to the refresh app button when you get an error? see the screenshot below:
This is because I’ve not tried it, but I wonder if you could use
useEffect (https://developer.atlassian.com/platform/forge/ui-kit-hooks-reference/#useeffect) in some way to help with state management and have the button click kick-off the async request to fetch the data and then let the components handle the state change themselves.