Closed TunahanTuna closed 2 years ago
onChange event was not triggering when the editor was empty.
onChange
To solve this problem I changed the newData.blocks.lengthcondition to !newData.blocks.length
newData.blocks.length
!newData.blocks.length
If condition is met, newData is made null.
newData
null
I returned the newData unchanged in cases where this condition is not met.
So now we can trigger the onChange event when the editor is empty.
The newData = nullstatement can also provide control when text input is required.
newData = null
:tada: This PR is included in version 2.0.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
onChange
event was not triggering when the editor was empty.To solve this problem I changed the
newData.blocks.length
condition to!newData.blocks.length
If condition is met,
newData
is madenull
.I returned the newData unchanged in cases where this condition is not met.
So now we can trigger the
onChange
event when the editor is empty.The
newData = null
statement can also provide control when text input is required.