dohomi/react-hook-form-mui

Persistent error text in MultiSelectElement

Closed this issue · 3 comments

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The error message in the helper text of a MultiSelectElement persists (without error styling) after the error has been cleared by revalidation.

Expected behavior 🤔

The error message should only appear when there's an error. Once the error is cleared, the message should go away.

Steps to reproduce 🕹

Steps:

  1. In storybook, go to the MultiSelectElement -> Required page
  2. hit submit without selecting an option, the error message comes up in red
  3. select an option, the error message persists, but the style (colour = red) is removed as though the error message is now the helperText

Should be fixed in #202

I've fixed this in #202, but the fix doesn't seem to get propagated to the review environment.

dohomi commented

Should be fixed in the latest release?

closing it for now feel free to re-open if the issue persist.