-
Notifications
You must be signed in to change notification settings - Fork 594
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
DataGrid: Fix duplicate headers when headerCellTemplate is given (T1155453) #24531
Conversation
const { getInstance } = this; | ||
|
||
return ClientFunction( | ||
() => (getInstance() as any).option('grouping.autoExpandAll', false), |
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.
minor: can we use DataGrid type from our .d.ts instead of any here?
_getContent: function(isFixedTableRendering) { | ||
if(isFixedTableRendering) { | ||
return this._fixedTableElement?.parent(); | ||
} | ||
|
||
return this.callBase.apply(this, arguments); | ||
}, |
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.
Minor comment.
Maybe the ternary operator will be better here?
_getContent: function(isFixedTableRendering) { | |
if(isFixedTableRendering) { | |
return this._fixedTableElement?.parent(); | |
} | |
return this.callBase.apply(this, arguments); | |
}, | |
_getContent: function(isFixedTableRendering) { | |
return isFixedTableRendering | |
? this._fixedTableElement?.parent() | |
: this.callBase.apply(this, arguments); | |
}, |
_removeContent: function(isFixedTableRendering) { | ||
const $scrollContainer = this._getContent(isFixedTableRendering); | ||
|
||
$scrollContainer?.length && $scrollContainer.remove(); |
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.
Minor comment.
Let's make this more obvious and add the if
condition.
Also, it will help us in migration to TS because TS linter doesn't allow constructions like this :)
$scrollContainer?.length && $scrollContainer.remove(); | |
if($scrollContainer?.length) { | |
$scrollContainer.remove(); | |
} |
See https://devexpress.com/issue=T1155453