Closed zaucker closed 2 years ago
I would suggest to call the url data functionality from within the loadData function, and thus merge any data coming from the server with the data given on the url before calling setData ... in this way any formReconf will get called as if the data came from the backend, and no strange things will happen from calling setData twice.
I would suggest to call the url data functionality from within the loadData function, and thus merge any data coming from the server with the data given on the url before calling setData ... in this way any formReconf will get called as if the data came from the backend, and no strange things will happen from calling setData twice.
But then it will be called on every _loadData()
and not just on appear. I guess this would probably work as the URL parameters are removed upon processing the first time.
Is this what you want?
no, the reason I am saying it is that loadData may cause formReconf and this may depend on the data entered in the form ... and if it gets filled with server data first, the reaction might be undesirable ...
hence I would merge the data
but yes guarding against repeated action is certainly a valid thing ...
the reason the 'original' code worked was because I never used it in connection with existing data
I left the callback in the appear handler, but merge the backend and urlData before setting the form.
ich wuerde nach moeglichkeit versuchen etwas weniger inline code zu machen ...
Suggestions comitted.
Allow form entries from URL with
in backend with URL
http://localhost:7181/#app=HINPassword;test=test
.Note: Backward-incompatible change (of none-documented feature).