Howto programmatically control the steps component #7278
-
Hi, I'm looking to progress the steps id at an interval. I've tried creating a JS query with an interval doing components.steps1.currentStepId++; The alert shows the updated count but the control doesn't show the change. Is there a way to tell a component to redraw? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @cmcclung-ANGENG , Let me know if you need further help on this! |
Beta Was this translation helpful? Give feedback.
-
Hi, I got it to to work. I ended up using variables. so the component looks to the variable the query updates and the js with the interval is in a seperate query. e.g JS query: Then inside another JS query https://docs.tooljet.com/docs/how-to/run-query-at-specified-intervals/ and run that JS query created above when required. I found that the clear interval had to happen in another query though. |
Beta Was this translation helpful? Give feedback.
Hi,
I got it to to work.
I ended up using variables.
so the component looks to the variable the query updates and the js with the interval is in a seperate query.
e.g
steps component current step = {{variables.stepsNumber}}
JS query:
variables.stepsNumber++;
return variables.stepsNumber;
Then inside another JS query https://docs.tooljet.com/docs/how-to/run-query-at-specified-intervals/
and run that JS query created above when required.
I found that the clear interval had to happen in another query though.