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

fix(module: textarea-item) fix ngModel #887

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sharky556
Copy link

@sharky556 sharky556 commented Jul 20, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

When a textarea is entered with a value, this._onChange is triggered in both of the following places, which causes the value of the form control to be triggered twice, leading to a number of problems
image

image

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@sharky556 sharky556 marked this pull request as draft July 20, 2023 09:04
@sharky556 sharky556 marked this pull request as ready for review July 20, 2023 09:04
@aijunhao
Copy link
Collaborator

I'm sorry, I can't reproduce the problem you mentioned. Can you give me a demo on StackBlitz?

@sharky556
Copy link
Author

I'm sorry, I can't reproduce the problem you mentioned. Can you give me a demo on StackBlitz?

When the value of the textarea input changes, you can see that the ngModelChange method is triggered twice, which doesn't look quite normal.
https://stackblitz.com/edit/angular-hrkf1c?file=src%2Fapp%2Fapp.component.ts

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

Successfully merging this pull request may close these issues.

2 participants