Open der-On opened 2 years ago
@der-On TBH, I would rather a fix that changes the Table widget to provide its data at all times, not just on a specific AJAX callback. The callback is more for tables that use server side data storage, essentially operating independently from the form. When the table is used normally (entirely client side), its data should be sent through the POST like any other field.
This particular change is probably a little too abstract and "hacky" to accept as it is.
@bennothommo No problem. Then I'll wait for the fix in the Table widget and use my fork until then. Will you provide the fix in the backend module or should I do a PR for that?
@der-On if you could provide a PR for that then that would be the best way forward; we're currently very busy on a number of complex projects (Laravel 9 finalizations, static analysis, search plugin, tailwind UI skin, new website / marketplace, etc - all in addition to our regular day jobs) so the best we could do for you is provide code review on your requested changes.
@LukeTowers Sure no problem. Thank for your faith. Happy to help.
@bennothommo @LukeTowers Where exactly can I provide a PR for the backend module? The repository on github says it's a "read only mirror".
@der-On You need to clone winter/winter into your repo, then create a branch in your repo for this PR.
Once this is done, you need to create a PR from github to Winter's repo against your repo.
@der-On the wintercms/winter repository.
@LukeTowers @bennothommo PR is now here: https://github.com/wintercms/winter/pull/560
If there is a datatable formwidget within a mlrepeater it does not send it's values over POST when switching locale.
The reason is that the table widget listens to a postback handler with the name
onSave
by default and only attaches the table values to the request if this ajax handler is used.The solution is to temporary set the handler to the
onSwitchItemLocale
when the locale is beeing changed.