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

Clearing Simple Combo with input does not trigger selectionChanging #14200

Closed
ricardosaracino opened this issue May 8, 2024 · 2 comments · Fixed by #14307, #14308 or #14343
Closed

Clearing Simple Combo with input does not trigger selectionChanging #14200

ricardosaracino opened this issue May 8, 2024 · 2 comments · Fixed by #14307, #14308 or #14343
Assignees
Labels
🐛 bug Any issue that describes a bug forms ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@ricardosaracino
Copy link

ricardosaracino commented May 8, 2024

Description

After having a valid selection i can re-enter the input and then press a character "d" and then click outside of the input. That will clear the input and mark it as invalid. This does NOT fire a (selectionChanging) as i would expect it to.

I would also find it acceptable to return the original selected text to the input, but just having it invalid without an event is confusing

** EDIT I think a better user experience would be to return the original text instead of clearing it and making it invalid. The user could then manually clear the input with the X

image

Click outside of input

image

Steps to reproduce

  1. Step 1
  2. Step 2
  3. ...

Result

Invalid form without a selection changing event

Expected result

I would expect the same selectionChanging event as when you close()

Attachments

Attach a sample if available, and screenshots, if applicable.

@ricardosaracino ricardosaracino added 🐛 bug Any issue that describes a bug 🆕 status: new labels May 8, 2024
@ricardosaracino
Copy link
Author

Im just using this work around for the time being

    this.formGroup.get('brokerAccountId').valueChanges.pipe(
      filter(s => !s),
      takeUntil(this.unsubscribe$),
    ).subscribe(this.fetchSecurities);

@georgianastasov
Copy link
Contributor

Hello @ricardosaracino,

Thanks for pointing this out!

We've decided that in the upcoming fix, we will ensure that when you input a character and click outside the input, the selectionChanging() event will trigger as expected. However, we won't be restoring the original text to the input field.

@georgianastasov georgianastasov added 🛠️ status: in-development Issues and PRs with active development on them and removed 👀 status: in-review Issue is currently being reviewed labels May 28, 2024
@georgianastasov georgianastasov added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Jun 3, 2024
@georgianastasov georgianastasov added 🛠️ status: in-development Issues and PRs with active development on them ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. 🛠️ status: in-development Issues and PRs with active development on them labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Any issue that describes a bug forms ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
4 participants