You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a reflex- based application with an auto_scroll component that updates whenever a line of text is entered into an input component. The code for this is below:
What I would like this application to do is to immediately add a line to the auto_scroll component when the line is entered into the input and the "Enter" button is clicked on. Then, after 10 seconds, it should add "Added a line" into the auto_scroll component.
Unfortunately, the current code doesn't work that way. The auto_scroll component does not update until the add_line() method returns. Consequently, I cannot seem to get it to update after the add_another_line() method returns.
I have looked at several applications that update a display when a form is submitted, perform network operations, then update the display with the results of those operations. I know that it is possible to make my application do what I want it to do, I just don't knopw how to do it. Unfortunately, I don't have access to the source code for those applications, so I have no way to see how it is done.
Can someone tell me how to make my application update my auto_scroll component immediately when I enter a new line, then update it again when the "Added a line" text is added 10 seconds later?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a reflex- based application with an auto_scroll component that updates whenever a line of text is entered into an input component. The code for this is below:
What I would like this application to do is to immediately add a line to the auto_scroll component when the line is entered into the input and the "Enter" button is clicked on. Then, after 10 seconds, it should add "Added a line" into the auto_scroll component.
Unfortunately, the current code doesn't work that way. The auto_scroll component does not update until the add_line() method returns. Consequently, I cannot seem to get it to update after the add_another_line() method returns.
I have looked at several applications that update a display when a form is submitted, perform network operations, then update the display with the results of those operations. I know that it is possible to make my application do what I want it to do, I just don't knopw how to do it. Unfortunately, I don't have access to the source code for those applications, so I have no way to see how it is done.
Can someone tell me how to make my application update my auto_scroll component immediately when I enter a new line, then update it again when the "Added a line" text is added 10 seconds later?
Thanks in advance for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions