Skip to content

Reset noclamp state to false when props text changes #58

Description

@JakeBaumbaugh

When changing the inner text, the noclamp state is not reset to false. This becomes an issue when going from short text (which does not get clamped, i.e. noclamp set to false) to long text (needs clamped). The text is still cut off at the line count, but the ellipses and "Read More" button do not appear.

I believe setting noclamp to false when detecting the text change in componentDidUpdate should do the trick. Alternatively, calling this.action instead of this.clampLines in componentDidUpdate may be preferred.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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