Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(form-mixin): Refactor form components for native behavior alignment #1389

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

rkaraivanov
Copy link
Member

@rkaraivanov rkaraivanov commented Sep 17, 2024

  • Aligned form components to mimic native counterparts when setting value/checked states via setAttribute(), ensuring internal defaultValue is updated accordingly.
  • Removed obsolete code.
  • Consolidated code into a more efficient API.
  • Renamed internal methods for clarity.

Closes #1386

…ignment

- Aligned form components to mimic native counterparts when setting `value`/`checked` states via `setAttribute()`,
ensuring internal `defaultValue` is updated accordingly.
- Removed obsolete code.
- Consolidated code into a more efficient API.
- Renamed internal methods for clarity.
@rkaraivanov
Copy link
Member Author

@wnvko
Feel free to test more form components if you have the time 😁

@wnvko
Copy link

wnvko commented Sep 20, 2024

@radomirchev
Rating with no initial value does not reset after user selects some value. Having rating in form like this:

<form action="">
  <igc-rating name="my-rating"></igc-rating>
  <igc-button type="reset">Reset</igc-button>
</form>

If I choose some value and then click reset button nothing happens - rating retains its value. This bug does not happen if rating has initial value, or if rating is single.

@rkaraivanov
Copy link
Member Author

rkaraivanov commented Sep 20, 2024

@radomirchev Rating with no initial value does not reset after user selects some value. Having rating in form like this:

<form action="">
  <igc-rating name="my-rating"></igc-rating>
  <igc-button type="reset">Reset</igc-button>
</form>

If I choose some value and then click reset button nothing happens - rating retains its value. This bug does not happen if rating has initial value, or if rating is single.

@wnvko
I suppose that replay was for me.
Thanks for catching the issue, it should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Input bound to local variable does not reset correctly
2 participants