Skip to content

[Input Group] Invalid style shown while an async validator is pending #17621

Description

@viktorkombov

Description

While an async validator is running, the control status is PENDING, but igxInput shows the invalid state and style. The user sees an error before validation has finished. Happens on master.

Framework

Angular

Angular Version

22.1.x

Ignite UI for Angular Version

22.2.x

Component / Area

Input Group

Browser

Chrome

Operating System

Windows

Command Not Working

No response

Steps to Reproduce

  1. Add the following to a dev sample:
public form = new FormGroup({
    name: new FormControl('', {
        validators: [Validators.maxLength(100)],
        asyncValidators: () => new Promise(resolve => setTimeout(() => resolve(null), 2000))
    })
});
<form [formGroup]="form">
    <igx-input-group>
        <input igxInput formControlName="name" />
    </igx-input-group>
</form>
  1. Run the sample.
  2. Type into the input and blur it.
  3. Watch the input during the 2 seconds the async validator runs.

Actual Result

The input shows the invalid style while the status is PENDING.

Expected Result

The input stays in its normal state while pending and only shows the invalid style if the validator returns errors.

Reproduction URL

No response

Attachments

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugAny issue that describes a bug✅ status: resolvedApplies to issues that have pending PRs resolving them, or PRs that have already merged.input-groupversion: 22.2.x

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions