Pearson-Higher-Ed / elements-sdk

Base Styling and Atomic JavaScript Components
MIT License
13 stars 13 forks source link

TextInput does refresh 'applyTextInputStyles' on update #155

Open pglockwo opened 5 years ago

pglockwo commented 5 years ago

'applyTextInputStyles' is only called on component did mount, when an error is applied to the component after the initial mount the error state CSS is not applied.

componentDidMount() { this.applyTextInputStyles(); }

Maybe this needs adding

componentDidUpdate() { // check here to see if the error state has changed before applying the styles this.applyTextInputStyles(); }