Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Component Select don't work properly!

Xenia free asked 3 years ago


Dear developers! I have a problem with a select component for angular. Two years ago was the same and now nothing changed. The large of those components I use in the modal windows. When I start the modal windows it works fine without problems. Then I close the window and open it again I don't see values in the options for changes. But the array for control always existing. I spend a lot of time resolving this situation and finding the right decision to change it with the same component from another library. Say me how to solve it or say me where can I write or call? I really tried to work with this library. Thank you.


Arkadiusz Idzikowski staff commented 3 years ago

@Xenia Please provide some information about the HTML/TS code that you use, so we can reproduce this problem on our end.


Xenia free commented 3 years ago

It's in a modal component.

baseNumber: BaseNumberType[] = [];

getBaseNumber() {
this.baseNumberService
  .FindAllCustomBaseNumberTypeAsyn(true)
  .pipe(takeUntil(this.destroy$))
  .subscribe((data) => {
    (this.baseNumber = data)
  });

}

 <div class="md-form">
      <mdb-select-2
        placeholder="Code"
        formControlName="BaseNumberTypeId"
      >
        <mdb-select-option
          *ngFor="let base of baseNumber"
          [value]="base.baseNumberTypeId"
          >{{ base.baseNumberTypeName }}</mdb-select-option
        >
      </mdb-select-2>
    </div>

Arkadiusz Idzikowski staff commented 3 years ago

Do you use MDB static or dynamic modal? Do you modify the list of options in any way between closing and reopening the modal or are they just re-downloaded from the service?


Xenia free commented 3 years ago

The modal window is the static element and every time I refresh the service and I have the list for select control. On the ordinary page, it works normally.


Arkadiusz Idzikowski staff commented 3 years ago

@Xenia we tried to reproduce this problem but without success. Can you prepare a simple demo app and send it to a.idzikowski@mdbootstrap.com?



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 10.1.1
  • Device: Asus
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No