plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
427 stars 575 forks source link

Fix initialValue block setting #5978

Open wesleybl opened 1 week ago

wesleybl commented 1 week ago

This fixes initialValue block setting in two situations:

In this situation, only the onChangeBlock method was called, which does not call the _applyBlockInitialValue method. Then we call the _applyBlockInitialValue method before calling onChangeBlock.

In this situation, the insertBlock method is called. But it passed the id of the previous block to the _applyBlockInitialValue method, instead of the id of the new created block.

fixes #5971

netlify[bot] commented 1 week ago

Deploy Preview for volto canceled.

Name Link
Latest commit f11be4afbcf62325025e96e6d82297a984431c1c
Latest deploy log https://app.netlify.com/sites/volto/deploys/66282048c7673500080bd0ce
netlify[bot] commented 1 week ago

Deploy Preview for plone-components canceled.

Name Link
Latest commit f11be4afbcf62325025e96e6d82297a984431c1c
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66282048d4a25f00089ff20e