-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Two checkbox controls in PluginPostStatusInfo – clicking one triggers both #12289
Comments
According to the comment on #10827, that PR might be related to this behavior. In a plugin of mine that hooks into See https://github.com/swissspidy/video-post-type/blob/0942bc7d6dc08ac1f5841032dbed295cd74a6670/assets/js/src/components/video-panel/index.js#L43-L63 for an example. Could you try that in your plugin as well and let us know if it works? :-) |
Yes, this should solve the issue and this is how we were supposed to do it before #10827 anyway. So It's not really a regression but with #10827, in theory we should be able to apply partial changes, which means if we update the |
Thanks @swissspidy, that works! Honestly, I don’t exactly understand why, but will try to dive into that topic later :) |
While @swissspidy's workaround may be effective, I'd still consider this to be a bug in how we fail to merge meta properties with edited values from the |
Describe the bug
I have two plugin installed, that both add a checkbox to the publish area via
PluginPostStatusInfo
. If one of both is already clicked and I reload the editor, both get triggered if I click the box that is not checked. If both are checked, both get unchecked. After the first click, it works.But the changed status of the not-clicked checkbox does not get saved – after clicking update, the correct status gets highlighted again.
To Reproduce
Steps to reproduce the behavior:
Not so easy, the checkbox values are depending on custom meta values.
I created a Gist with the code of both checkboxes in one file, so you can take a look how the code is: https://gist.github.com/florianbrinkmann/2c1fd1b7477f28354d65380dcc8c4170
Expected behavior
Only the one checkbox should be triggered.
Screenshots
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: