Skip to content

Produced values of output of hasTruncated is confusing #85

Open
@rqman

Description

@rqman

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions