Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

this.dispatchEvent(UPDATE) called too often #54

Closed
FrancescoCioria opened this issue Jun 27, 2017 · 0 comments
Closed

this.dispatchEvent(UPDATE) called too often #54

FrancescoCioria opened this issue Jun 27, 2017 · 0 comments
Assignees
Labels

Comments

@FrancescoCioria
Copy link
Contributor

description

this.dispatchEvent(UPDATE) should be called only when TextareaAutosize receives an unexpected props.value while, at the moment, it's called every time props.value is different from prevProps.value which happens after every onChange

how to reproduce

  • {optional: describe steps to reproduce defect}

specs

  • in this.onChange cache the current value as this.currentValue
  • in componentDidUpdate call this.dispatchEvent(UPDATE); only if props.value is different from this.currentValue

misc

{optional: other useful info}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants