Let me explain my question.
For “LIST of products” page i use Fetch collection → co its easy to set variable of displaying loader on parameter “isFetching” and it pefeclty works! Awesome.
When user clicks on list item I have next steps:
populate Query Var “product_id”
navigate to Product Details Page
in prod. details page I have a workflow on load which Fetches product with id=product_id query var
I populate var “ProductData” as object from Fetching one product (separate endpoint)
in fields of specific product I display data from the Var
My problem is that for specific product I cannot find parameter “isFetching” in editor on any step… Like i have it for Collections.
SO my data is appears after some time and is looks confusing.
How do I find is Fetching for specific product??
How it looks without loader:
1 Like
There is not going to be isFetching for that.
You need to create a separate variable that you bind the display of your loader to.
Here is what I do:
Create a variable called “form” and set it to type object with null keys of “name”, “action”, “status”, “message”
Then, in the first step of your workflow,
Set:
Form.name = “trend”
Form.status = “fetching”
Then; at the end of the workflow, reset the form variable.
Bind the display of the loader to form name of item and status of fetching.
I use this same variable for loading pop up modals, editing data, etc. it’s very handy.
2 Likes
Joyce
June 27, 2022, 3:03pm
3
Wow! Love that you did that, Kevin!
I have a separate boolean variable for each workflow but love your approach of passing the form name to an object variable
Just added it as a pro tip in the user doc !
2 Likes
ben
October 20, 2023, 8:06pm
4
I am curious to learn what’s in the User doc but I got a 404. Is the user doc still available?
Joyce
October 23, 2023, 2:18pm
5
Thanks for reporting it! Just updated the link
This is great thank you!
Just to follow up now with components, is there a good way of creating a component that allows for the same? Would be great to not have to add a fetching variable before and after every single workflow.