Skip to content
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

OnChange no longer assigns to existing data #1278

Closed
PeterKottas opened this issue Feb 12, 2023 · 4 comments
Closed

OnChange no longer assigns to existing data #1278

PeterKottas opened this issue Feb 12, 2023 · 4 comments
Labels

Comments

@PeterKottas
Copy link
Collaborator

Describe the bug
When updating to the latest version (v5.4.1) I noticed that calling OnChange inside a plugin no longer assigns to existing data, it replaces them. This breaks some of the existing plugins. Not sure when this was introduced though.

To Reproduce
Steps to reproduce the behavior:
Go to https://react-page.github.io/ and play with the background plugin. Once you change anything, the data disappears and it only holds the latest change.

Expected behavior
I believe it should map onto existing data, if anything changed and is documented, we should probably at least fix the demo.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: ALL
  • Browser ALL
  • Version v5.4.1
@PeterKottas
Copy link
Collaborator Author

PeterKottas commented Feb 12, 2023

@macrozone I think you made some changes around these parts recently, you might have some extra info as to what happened there. I believe it's this code there are some changes compared to the old version that worked (that's the hook that creates the onChange method) that's causing trouble here. I am thinking this might have been an unintended sideffect of adding some i18n functionality? Don't really want to touch it right away as it seems you were after something. Better wait for your input. Cheers

@daniel-minchev
Copy link

I can confirm the bug, we also experience this.

@macrozone
Copy link
Collaborator

ok, that was not intentional. Will fix it asap

@PeterKottas
Copy link
Collaborator Author

I can confirm it works. Well done, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants