Is there a way to retain the config values on edit? I have an app that uses the macro-config macro. That accepts the values I have on submit, but when I click the edit button, it brings up the config dialog with empty values (e.g. my text fields are empty).
What approach do people take for this kind of thing with UI Kit 2?
There are a few ways to add config values to a macro in Forge at the moment.
I think, based on what you’re after that you may want to use the custom configuration method, which gives you more control.
There’s also a bug I’m currently trying to bring to Atlassian’s attention too regarding addConfig() because that gets executed on every page view/edit when the macro config UI is not active.
I’m no react dev, and learned about useEffect only last week. I got it to semi-work but had a bug that was because I was exporting my default config to index.jsx. After removing that export, that worked. Thanks all for the help!