HealthCatalyst / Fabric.Cashmere

Health Catalyst’s comprehensive design system.
http://cashmere.healthcatalyst.net
Apache License 2.0
66 stars 76 forks source link

fix(input directive): fix - error not resetting when validation=change #2255

Closed JakeSaintG closed 10 months ago

JakeSaintG commented 11 months ago

fix #2186

JakeSaintG commented 11 months ago

A lot of the minor tweaks like spacing came from running npm run prettier. The bulk of the fix involves altering how error state is checked with regards to "onChange". When in the newState variable, it was always coming back as truthy. Moving this check to the input event preserved the error state updating on typing but allowed the reset event to remove it.

Additionally, Cory mentioned in the issues that the example was a little confusing with the two types of reset buttons. When deciding between one that handled resetting the default way (type=reset) and Angular's way to resetting, Cory and I chose to keep the later around. image

health-catalyst commented 10 months ago

:tada: This PR is included in version 16.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: