-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix data table height not calculating correctly #243
Conversation
My gut says wait until it lands in React world so we're parallel with them as far as possible. We can leave this branch here and if anywhere needs the fix, they can just reference this branch.
Good catch, I never stopped to think about why |
@@ -482,6 +482,12 @@ export default Component.extend( | |||
this.addEventHandlers(); | |||
}, | |||
|
|||
didUpdateAttrs() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we're better off using didRender
rather than didUpdateAttrs
- reason being that we could potentially be passing objects to represent content (e.g. a hash of componentName
and props
); if the content changes but the object reference stays the same, I think didUpdateAttrs
won't trigger, but didRender
will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh good call. I'll update 👍
df31dbb
to
a30ddfe
Compare
@andrewpye updated to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good @tomnez - if this isn't to be merged until a future Polaris update, can you mark it as such please so we know when this can be merged & shipped? 👍
since this is a bug and it's just an implementation detail, not involving a changed API or anything...what do you guys think of just shipping this now? NOTE: I don't think we should be 1:1 with any issues in the React implementation 😜 |
I do see your point, but at the same time, fixing bugs in parallel with the React implementation does make issue tracking/resolution more straightforward in Ember-land... |
we should then maybe add a comment, but definitely not wait to update to matching react version if it was already fixed in React in a newer version...especially if it's a straight-forward fix |
Ok, we'll get this in now after the build completes instead of waiting. I'll add a comment 👍 |
thx boizz |
a30ddfe
to
0278890
Compare
@andrewpye reverted back to using |
e5ea62d
to
7dd3126
Compare
Overview
Cell heights weren't being recalculated when underlying data changed (#161)
The recalculation issue is fixed in Polaris by recalculating height when the
DataTable
component updates.On hold
This fix doesn't appear in the React version until v3.0.0-beta.11, so we should hold off on merging until we have a 3.0 version of ember-polaris just to keep our versions in sync.(we'll ship now and add a comment)Demo