Change templatelock dynamically?
-
I added an
<InnerBlock>
with a template andtemplateLock={'all'}
option. Within a function I add blocks and remove blocks dynamically. The problem is that adding blocks causes problems when thetemplateLock
is set to something different thanfalse
(missing properties for example). If I hardcode thetemplateLock
tofalse
at the initialregisterBlockType
everything works like it should (Except that I don’t want it set tofalse
all the time). Is there a way to do that programmatically?
I am working in a custom block and used an attribute. But because my function has asynchronous elements changes to the attribute won’t change anything because the lock is called earlier.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change templatelock dynamically?’ is closed to new replies.