Produced values of output of `hasTruncated` is confusing
rqman opened this issue · comments
Roman Astashevich commented
In case of using input watchChanges
and too long text on each update hasTruncated
- will produce two values.
- First value emited after acutal value change.
- The second will be emitted after
line-truncation
finish work and providetruncated
value to DOM.
SohasTruncated
will emitisTruncated = false
however actually text has been truncated.
Environment: See example
- Editor that allow to write a long notes.
- Note preview should display a few first lines.
- Allow view all note's text by clicking on show more/ show less.
Step to reproduce:
- Change text into
textarea
(Text should have enought symbols to apply truncation) - Press
Save / sync changes
button
Expected behavior:
hasTruncated
- should emit one valuetrue
Actual Behaviour:
hasTruncated
- emittedtrue
hasTruncated
- emittedfalse