Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produced values of output of hasTruncated is confusing #85

Open
rqman opened this issue Feb 8, 2023 · 0 comments
Open

Produced values of output of hasTruncated is confusing #85

rqman opened this issue Feb 8, 2023 · 0 comments

Comments

@rqman
Copy link

rqman commented Feb 8, 2023

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 provide truncated value to DOM.
    So hasTruncated will emit isTruncated = 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

image

Expected behavior:

  • hasTruncated - should emit one value true

Actual Behaviour:

  • hasTruncated - emitted true
  • hasTruncated - emitted false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant