Help Understanding the Wizard Component

I'm having a difficult time understanding the wizard component... it's almost like it's too flexible and I'm not able to wrap my head around it. Is there a current template I could import to see how the on-change query is utilized? I'm not able to find an example in the documentation that uses the query. Is it expected to use a js query and execute other queries based on which step was executed?

Hey @matth – totally understand, it can take a while to wrap your head around :slight_smile: We don't have any publicly available templates yet, but I've worked with the wizard quite a bunch on internal apps.

One use case for the onChange query is dynamically loading data based on different wizard steps. For example, you might have a table in a wizard step that's populated based on a SQL query, and you want to trigger that query to run when the user of your app moves to that wizard step. In that case, like you mentioned, you'd create a JS query that acts like a sort of router, choosing which query to trigger based on the currentStep value. It might look something like this:

Hope this helps!

1 Like

Appreciate the assistance! I ended up using a tab component w/ buttons to trigger queries/js/etc bc it made more sense at the time. I will take a stab at converting it to a wizard and see how it works for us.

Any templates to explain functionality yet. I'm wondering what the best way to store data is. I'm having the wizard build out a data set, and I only want to save the data at the end of the wizard.

Hey @kauthon :wave: Would you mind sharing a screenshot or two of your wizard component and how you are building this dataset? One thought would be to store all the data in temporary state and save it (I assume by save this is sent to a db) at the end.