material-web/textfield/demo
Elizabeth Mitchell 3151fd8d90 fix(textfield): error styles not removing when an unrelated control is invalid
The bug: given a form with two required text fields,
1. Try to submit the form, both fields show error.
2. Add a value to the first field.
3. Try to submit the form, the first field does not remove its error.

This is fixed by listening to form submits and clearing the error state if the control is valid.

I refactored `injectFormReportValidityHooks()` into `addFormReportValidListener()` to keep the `OnReportValidity` class cleaner and better identify the problem we're trying to solve.

PiperOrigin-RevId: 597664564
2024-01-11 15:06:22 -08:00
..
demo.ts chore: format files with prettier 2023-10-25 11:59:00 -07:00
project.json build: use firebase for hosting and remove url prefixes 2023-07-27 09:17:27 -07:00
stories.ts fix(textfield): error styles not removing when an unrelated control is invalid 2024-01-11 15:06:22 -08:00