-
Notifications
You must be signed in to change notification settings - Fork 91
Directive which overrides Component @Input does not work #397
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
Comments
Hey @PauloKoglin, thanks for opening this issue. |
@PauloKoglin the "issue" is a different outcome when using input bindings For a reproduction see #401 |
Hi @timdeschryver, I still have the same problem. I've used a workaround to manipulate the property without a directive. I really would like to use the directive, like it's the clean way to override the component's properties. |
@PauloKoglin did you try #397 (comment) ? |
Hi @timdeschryver, sorry for not replying your last comment quickly, I haven't seen it. 🤦 I just tried your code examples and it works! The problem was that I used the constructor to set/override the input. In your example I noticed that the only case it didn't work, was exactly the directive, which sets the input in the constructor, all others work like expected. Thank you for bringing light to this issue. 😄 |
Hi, I'm having an issue with a directive which should override an @input of a PrimeNG Component. In the real app it does work, but in the test not.
I have such a directive, that overrides the
virtualScroll
@input from the PrimeNGp-table
:In the test, I would expect, that the
virtualScroll
attribute gets changed, but it's not the case:The
screen.debug()
results are this:As you can see, the attribute
ng-reflect-virtual-scroll
fromp-table
is stilltrue
.Is there anything I`m doing wrong? 😕
The versions I`m using
The text was updated successfully, but these errors were encountered: