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

JS console error: onChangeFocus marked as required in EditBlock #80

Open
mauritsvanrees opened this issue Feb 15, 2024 · 0 comments
Open

Comments

@mauritsvanrees
Copy link
Member

In a test project with volto-form-block and volto-sub-blocks I see this error on the javascript console when adding a form block to a page:

Warning: Failed prop type: The prop onChangeFocus is marked as required in EditBlock, but its value is undefined.

(Yes, it is an error even though it starts with "Warning"...)

I guess it is about this EditBlock class in the current repo.
And onChangeFocus is marked as required in volto-subblocks.

I don't know what a proper fix would be: add EditBlock.onChangeFocus = false or true, or I guess a function, though I do not know what this function would have to do. Or maybe make onChangeFocus not required.

In my case, due to this error I actually thought the block was broken, maybe not yet compatible with Volto 17, or with volto-light-theme, because it was not working.
In fact it worked fine. I simply did not yet understand the UI: I expected that I could add fields in the main part of the edit page, but you can only do this in the "side column" (I don't know if that is the right term).

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

No branches or pull requests

1 participant