Open Closed

Typeahead from ExtensibleForm not filling with patched value #8965


User avatar
0
davidsi02 created
  • ABP Framework version: v9.1.0

  • UI Type: Angular

  • Database System: EF Core SQL Server / MongoDB

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

  • Exception message and full stack trace: None

  • Steps to reproduce the issue:

Created an component with the following HTML using abp-extensible-form:

<ng-template #abpBody>
  <ng-template #loaderRef>
    <div class="text-center"><i class="fa fa-pulse fa-spinner"></i></div>
  </ng-template>
  <form [formGroup]="form" (ngSubmit)="save()" [validateOnSubmit]="true">
    <abp-extensible-form [selectedRecord]="selected"></abp-extensible-form>
  </form>
</ng-template>

And with the following typeahead defined on defaults:

{
    type: ePropType.Typeahead,
    name: 'myProp',
    id: 'myProp',
    displayName: '::MyField',
    validators: () => [Validators.required],
    options: (data, params) => {
      const service = data.getInjected(MyService);
      return service
        .getList({
          filter: params ?? '',
          maxResultCount: params?.maxResultCount,
          skipCount: params?.skipCount,
        } as MyInput)
        .pipe(
          map(pagedResult => {
            return pagedResult.items.map(
              item =>
                ({
                  key: item.displayName,
                  value: item.id,
                })
            );
          })
        );
    },
  }

When creating a new record everything works fine, but when I patch a value to the form wich contains myProp correctly defined and with a valid value the typeahead component don't autofill that value, even when trying to force it through form. I don't have this problem with abp-lookup-typeahead components in forms created manually through HTML.

Here's my buildform method

buildForm() { const data = new FormPropData(this.injector, this.selected); this.form = generateFormFromProps(data); }

Thanks in advance for any help provided.


4 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    We received your ticket.
    Our Angular team will help you on this topic soon

  • User Avatar
    0
    erdem.caygor created
    Support Team

    Hello, thank you for reporting this issue.
    However, I am unable to see your HTML code properly. Could you please resend it?

  • User Avatar
    0
    davidsi02 created

    Hello, thank you for reporting this issue.
    However, I am unable to see your HTML code properly. Could you please resend it?

    Hi. I updated the question with the HTML code.

  • User Avatar
    0
    erdem.caygor created
    Support Team

    Hello,

    I have investigated your case, and it appears to be a bug in the abp-extensible-form. I have created this issue, and we expect to fix it in the next patch release. You can follow the progress on the release page: GitHub ABP Releases. Thank you for reporting this issue!

    Best regards

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00