-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Incorrect attributeBindings for Ember model #4542
Comments
Nothing strikes me as an obvious culprit here, and without a reproduction it is going to be pretty hard to track down... |
@rwjblue @stefanpenner and I tracked it down on our end to a situation in which the records (store vs ui) were actually referencing separate InternalModels with identical IDs. I've since been able to identify a code path in which an async hasMany loaded with its parent will produce two separate InternalModels, one is left disconnected but is unfortunately the one returned to the UI. It's a rather difficult situation to untangle at the moment, but I should have it fixed soon. |
Likely duplicate: #4507 |
@runspired did you get a chance to track this one down? I'd be happy to pair on it tomorrow. |
We've resolved this with #5413 |
We have two models,
dashboard
andreport
and the relationship is set up likereports: hasMany('reports')
inmodels/dashboard.js
.In our
dashboards/show.js
route we pass the selected dashboard to adashboard-grid
component in which we iterate over thereports
like this:Inside
dashboard-grid-report
we useattributeBindings
like this:Now, every 10-20th time we render the
dashboard-grid
component the attribute bindings will be incorrect. For instance, for a specific report we look into Ember Inspector and see thatcolumn: 0
androw: 4
while in the DOM element the values aredata-gs-x="5"
(incorrect) anddata-gs-y="4"
(correct).Unfortunately we haven't found any reproducible case for this issue.
What is interesting though is that when the issue occurs, the order of the
data-gs-
attributes in the DOM element will be different for thereports
where the values are incorrect.For example:
1. case (all reports are correct, no problems)
All report DOM elements have the following structure
2. case (some reports are broken)
The DOM element attribute order varies between broken and correct reports.
e.g. DOM element for a correct report
e.g. DOM element for a broken report
The incorrect attribute in this report is
data-gs-y
, which should be4
.@runspired mentioned that he has seen the same bug, but was also not able to reproduce it. Hopefully this report helps.
Versions:
The text was updated successfully, but these errors were encountered: