refreshOn attribute doesn't work
if you create a select component and fill the values with custom js and set the refreshOn you will see it doesn't work
Hello Amir,
This is William with the Form.io support team. Thanks for reaching out.
We fixed a bug with the latest release that does resolve an issue with refreshOn where it would stop working after the first trigger. Try the latest release of 3.5.2.
Please let me know if you have any further questions or concerns.
Thanks,
William Gay Form.io Developer Support
Hi William,
I'm on latest 3.6.0 version but I have issue on refreshOn not updating ..
I'm linking to "Url Source based" lists with on is the parent "City" and child "Neighbor" ..
Still, it doesn't refresh on new city selection ..
Here's the neighbor list schema:
{
"label": "Neighbor ",
"mask": false,
"tableView": true,
"type": "select",
"key": "neighborId",
"input": true,
"data": {
"url": "/api/Lookup/GetNeighbors",
},
"dataSrc": "url",
"refreshOn": {
"label": "City",
"value": "cityId"
},
"clearOnRefresh": true,
"validate": { ... },
}
Hello Abdullah, This is William with the form.io support team. Thanks for reaching out.
We have one of our developers investigating this issue. We will let you know what they find out. We would love to connect hear about your project and see how we can help. Additionally, our on premise deployment allows you to deploy our entire platform within your own infrastructure giving you complete control over your data.
And finally, we also have support packages available for training, support or development services if you are interested!
Please let me know if you have any further questions or concerns.
Thanks, William Gay Form.io Developer Support
Thank you William, really appreciate the followup !
Could the issue because of refreshOn binding, to be single value string with the key name?
Have you tried the latest release? The last change that I made to the renderer fixes an issue with the refreshOn handler.
Thank you @travist. I was on the latest release.
After additional examination, it appears refreshOn only supports single key values only.
Above it was linked automatically with fetched list item object { label: .., value: }
Setting valueProperty on the list component didn't solve it, but specifying refreshOn: 'cityId' did.
Glad to hear you got the issue figured out.
Please let me know if you have any further questions or concerns.
Thanks,
William Gay Form.io Developer Support
This is still not working in my case. Is there any solution for it?
Hello Rishabh,
Can you please clarify what you mean by "not working"? This will help us find the source of the issue.
Please let me know if you have any further questions or concerns.
Thanks, William Gay Form.io Developer Support
Another followup on refreshOn behavior 😅
I noticed that if the controls where inside data-grid, the dependant control doesn't work (not firing with parent changes).
Hello,
Can you provide an example form? If you have a select controller referencing a resource, for example, you will need to make sure you are referencing ‘row’ and not ‘data’ to populate the data or values.
Please let me know if you have any further questions or concerns.
Thanks,
Thank you very much @wag110894 !
~using contextual row variable fixed the refresh:~
refreshOn: 'row.cityId'
Update:
We can't reference row, [i], or {{row.x}} in refreshOn. Only simple keys.
It is supported in filter with Handlerbar syntax filter: '{{ row.x }}' , though.
Inside a gird, you can just write: refreshOn: 'cityId' & it will link magically to the current row's cityId.
Yep, I found the same issue when you use refresh on event in grid element. It bind a incorrect key.