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
The component always emits change event when I just click in the editable field and the click outside without any change. I can see the reason in emitChange function. There is condition html !== this.lastHtml which is never false on first blur event, because this.lastHtml initial value is never set so at this moment it is undefined. Change event is fired even if there was no change.
I think this.lastHtml should be set in constructor and also should also update on componentDidUpdate, so when blur or change event is fired for the first time, the variable this.lastHtml will be already filled with correct value.
The text was updated successfully, but these errors were encountered:
The component always emits change event when I just click in the editable field and the click outside without any change. I can see the reason in
emitChange
function. There is conditionhtml !== this.lastHtml
which is never false on first blur event, becausethis.lastHtml
initial value is never set so at this moment it is undefined. Change event is fired even if there was no change.I think
this.lastHtml
should be set in constructor and also should also update oncomponentDidUpdate
, so when blur or change event is fired for the first time, the variablethis.lastHtml
will be already filled with correct value.The text was updated successfully, but these errors were encountered: