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

disabled on item not working #132

Open
galvakojis opened this issue Dec 13, 2018 · 6 comments
Open

disabled on item not working #132

galvakojis opened this issue Dec 13, 2018 · 6 comments

Comments

@galvakojis
Copy link

galvakojis commented Dec 13, 2018

https://stackblitz.com/edit/ngx-select-ex-issues-100-uezwvq?file=app/app.component.ts

expected behavior:
after selection an item in "a", in "b" that item should be disabled

looks like [items] array is not refreshing after changes

@optimistex
Copy link
Owner

@galvakojis
Copy link
Author

it is working... but then how about vice versa?
when something is selected on "b" it needs to disabled on "a"

@optimistex
Copy link
Owner

@galvakojis It was just an example, not perfect but shows an idea.

@optimistex
Copy link
Owner

@optimistex Konstantin Polyntsov:
If you want you can try to improve the component. I'll publish it as a dev branch. Better to make tests.
I would help you but I'm too busy right now.
If you consider to maintain then feel free to ask me

@galvakojis
Copy link
Author

@optimistex
i think the problem is with item differs(?) it should check changes of object properties also

@optimistex
Copy link
Owner

@galvakojis Probably it is because of:

changeDetection: ChangeDetectionStrategy.OnPush,

It was added by one of maintainers for some performance.
So, probably we need use a code like this:

Unfortunately, I have no so much time to investigate it for now.
It would be cool if you'll found some time to fix it.

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

2 participants