Police-Data-Accessibility-Project / design-system

Vue component library and assets for PDAP-branded client apps
MIT License
0 stars 0 forks source link

refactor(components): update form #51

Closed joshuagraber closed 4 months ago

joshuagraber commented 4 months ago

Ensure Form props passed to form element (id and name were missing) Ensure data update on schema change (use reactive instead of ref) Add change emit to Form (for clearing custom errors) Use change event emitted by Form for clearing custom error handling in QuickSearchForm

joshuagraber commented 4 months ago

Another one here for you @josh-chamberlain when you have time.

Just some under-the-hood logic. Screen recording shows updated functionality:

https://github.com/Police-Data-Accessibility-Project/design-system/assets/68428039/6cdba95c-a94c-4fe1-bf17-ac377277b8b6

TLDR: the Form state was not properly reactive, so when I dynamically updated the schema to add a confirm_password field, it wasn't updating.

While here, I also added support for a change emit to clear custom error validation (such as what is passed from QuickSearchForm) when a user updates the fields to be correct per the custom validation. I'll also need this for the "signup" version of the login form, as we'll need to check that the password values match before sending pw to the backend, etc.

github-actions[bot] commented 4 months ago

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

The release is available on:

Your semantic-release bot :package::rocket: