Skip to content

Conversation

@ntvsx193
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

When setting input bingins via createComponentFactory(TestComponent)({ props: {} }) or run spectator.setInput(...), hook ngOnChanges is not called.

Issue Number: #348

What is the new behavior?

The hook ngOnChanges fired on first install input's and update via spectator.setInput(), spectator.setHostInput()

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Now, internal setProps update value of instance only if values not equals. It is affected setInput, setHostInput.

@NetanelBasal
Copy link
Member

Thanks. I will check it when I have time. Can you please update the docs and describe the added behavior?

@ntvsx193
Copy link
Contributor Author

done, doc updated.

@NetanelBasal
Copy link
Member

LGTM. I'm wondering if this change can affect an existing code somehow.

@ntvsx193
Copy link
Contributor Author

ntvsx193 commented Nov 5, 2020

@NetanelBasal any progress?

@NetanelBasal
Copy link
Member

I'm wondering if this change can affect an existing code somehow

@ntvsx193
Copy link
Contributor Author

ntvsx193 commented Nov 5, 2020

I'm notice you in code review. Are you check this?

@NetanelBasal NetanelBasal merged commit 2a6cd5e into ngneat:master Nov 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants