You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have a simple react component mark any component as required. It should work similar to the <Optional> component we already have in that you pass it a value that needs to exist in order for the condition to be met.
If the condition is not met, but the block is in the document, the editor should be locked from saving anything using the core APIs.
const{ lockPostSaving, unlockPostSaving }=useDispatch('core/editor');// we can then lock / unlock the editor using these functions herelockPostSaving('title-empty-lock');unlockPostSaving('title-empty-lock');
Removing the block should also unlock the editor.
Additionally, it would be great to show the reason why the editor is locked in a notice when the user tries to save the post & also something in the PrePublishCheck to show all the required fields that are empty would be great.
The content you are editing has changed. Please copy your edits and refresh the page.
It would be great to have a simple react component mark any component as required. It should work similar to the
<Optional>
component we already have in that you pass it a value that needs to exist in order for the condition to be met.If the condition is not met, but the block is in the document, the editor should be locked from saving anything using the core APIs.
Removing the block should also unlock the editor.
Additionally, it would be great to show the reason why the editor is locked in a notice when the user tries to save the post & also something in the
PrePublishCheck
to show all the required fields that are empty would be great.Tasks
I think we should be able to use the clean up function of a
useEffect
hook to handle the unlocking on removal for us.The text was updated successfully, but these errors were encountered: