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

Bug when disabling dropdown item #1181

Open
VisionSystemDev opened this issue Jan 25, 2024 · 0 comments
Open

Bug when disabling dropdown item #1181

VisionSystemDev opened this issue Jan 25, 2024 · 0 comments

Comments

@VisionSystemDev
Copy link

I'm submitting a


[x] Bug / Regression
[ ] Feature Request / Proposal

I'm using


NG Dynamic Forms Version: `18.0.0`

[ ] Basic UI
[ ] Bootstrap UI  
[ ] Foundation UI
[ ] Ionic UI
[ ] Material  
[ ] NG Bootstrap
[x] Prime NG

Description

In my application, when selecting an item from the drop-down list, it disables this option, it was working normally in version 15. After the update, the item is selected normally, however it does not show the item in the dynamic component, but in the formGroup the value is assigned.

I tested it with the p-dropdown component of primeng and it works, only when the dynamic component v18.0.0 is used does the error happen

How to disable formArrayModel item


this.formArrayModel.groups.forEach((group) => {
        const dropdown = group.group[0] as any;

        dropdown.options.forEach((option) => {
          if (
            !option.value?.nomeChave ||
            this.containsOption(option.value?.nomeChave)
          ) {
            option.disabled = true;
          } else {
            option.disabled = false;
          }
        });
});

image

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

No branches or pull requests

1 participant