-
Notifications
You must be signed in to change notification settings - Fork 109
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
data binding issue with array #88
Comments
Looks like changing the array itself updates the react component but changing the contents of the array does not. |
This is because of the React Component's implementation of prop change detection. If you pass in a react PureComponent, or do not implement a suitable In summary. The issue lies with your component, not |
Thank you for the explanation and reference documentation! Makes sense. |
@ajdaniel As far as I can see, the component in question doesn't implement neither PureComponent, nor shouldComponentUpdate Therefore it's not the react component that prevents rerendering It seems that the angular component doesn't trigger a rerender for some reason. |
After looking at the source code, I believe the problem lies here: https://github.com/coatue-oss/ngcomponent/blob/master/index.ts#L42 So basically the |
@everdimension well spotted. Yes, this is a replica of I think |
I agree, but currently it does. Which is a problem. But at the moment, it seems to be impossible to make a component update after pushing an element to the array because the inner logic of |
@everdimension as this issue is now closed, can you please raise a new issue detailing this information, and stating that we should address this. The solution is yet unknown, but we should track this in a new issue. Thank you. |
Ok, sure! |
Hi,
I have a list defined in an angular directive with a react component embedded using react2angular. When I update the list, the data binding doesn't seem to propagate down to the react component. Any ideas?
https://react2angular-binding-issue-ey652s.stackblitz.io
The text was updated successfully, but these errors were encountered: