-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datatable formwidget within a translatable repeater clears values on locale switch #33
Comments
@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: wintercms/winter#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.The text was updated successfully, but these errors were encountered: