I need to dynamically generate UI and Module components from a loop, and then Immediately update the Inputs. I'm having issues getting this to work. Any suggestions? In this case, I want the inputs to update to 'Success!!' after I create the UI components.
Hi @jordanwebb10. For mdlUI, I will wrap the textInput with div contains id that equal to module id, so it can be easily to remove with the div id. The code inside mdl also modified to update textInput. A reactiveVal added to store the number of input added otherwise it will have same module id when you press Add UI button twice which you will loss control of the input.
Thank you for your response. In my main App I have an UI ID system in place to manage the uniqueness of the ID's, so that shouldn't be an issue. But, I didn't have my UI wrapped in DIV! That will be extremely helpful.
Anyways, back to my main issue of trigger the updateInput() once the module is created. I've previously tried your suggestion of simply having an update statement in an observeEvent() but it doesn't work! I believe the difference is because my main app, which is 8000+ lines plus and requires data being loaded from a database, the UI takes longer to render. Perhaps the updateInput() runs before the UI even exists? Is there a way to make sure the UI is finished loading, then run the updateInput()?
I wasn't even sure how to create a smaller repex without copying way too many lines of code.
@jordanwebb10. I am not sure because I didn't have the full picture of your code. But you may try trigger the observeEvent of update input with the reactiveVal that you loaded the database. See if the update will happen after loading the database.