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
This is (likely) an upstream bug & feature request. (related to this Vue issue)
Prerequisites
Are you running the latest version?
Are you reporting to the correct repository?
Did you check the documentation?
Did you perform a cursory search?
Description
When changing any data in a slot this causes a re-render of the parent (<enso-form>), this is due to Vue behaviour which is fixed only for statically defined slots at this point (see issue above).
The main issue this causes is that all SelectField's are re-fetching their data.
Steps to Reproduce
Have a custom slot that contains changable data (f.e. a sum sourced by the defined select)
Note that changing the value causes all forms to fetch data from the server again
Expected behavior
Updating a simple string not to refetch options of all fields in the form
Actual behavior
All select fields fetch data again, even if no parameters are changes
Suggestion
As this is most likely caused by Vue.js (2.0) behaviour, change the way SelectField fetches data (bubble up?) when used inside an EnsoForm (use the EnsoForm instance as a cache?)
To keep separation, preserve current behaviour if the caching property is unavailable.
I hope there's a better way as I fully understand this can't be ideal, but the limitations caused by the dynamically generated slots regenerating the whole form heavily limits the flexibility, especially when dealing with complex forms.
The text was updated successfully, but these errors were encountered:
I'll try to reproduce the issue once the new version is out (non-alpha) and try to pin down the cause if not (though as mentioned in the OP from it's description it seems to be a Vue2.x-related issue
For anyone stumbling upon this in the future: using object litterals ({ something: '123'}) in params, custom-params, ... is causing vue to assume it's an updated entity on every ui update (since Vue2.x); which was likely the root cause of this issue.
This is (likely) an upstream bug & feature request. (related to this Vue issue)
Prerequisites
Description
When changing any data in a slot this causes a re-render of the parent (
<enso-form>
), this is due to Vue behaviour which is fixed only for statically defined slots at this point (see issue above).The main issue this causes is that all
SelectField
's are re-fetching their data.Steps to Reproduce
Expected behavior
Updating a simple string not to refetch options of all fields in the form
Actual behavior
All select fields fetch data again, even if no parameters are changes
Suggestion
As this is most likely caused by Vue.js (2.0) behaviour, change the way SelectField fetches data (bubble up?) when used inside an EnsoForm (use the EnsoForm instance as a cache?)
To keep separation, preserve current behaviour if the caching property is unavailable.
I hope there's a better way as I fully understand this can't be ideal, but the limitations caused by the dynamically generated slots regenerating the whole form heavily limits the flexibility, especially when dealing with complex forms.
The text was updated successfully, but these errors were encountered: