-
Notifications
You must be signed in to change notification settings - Fork 9
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
Grid upgrade #3395
Grid upgrade #3395
Conversation
Not quite sure how to handle this. It looks like the type for headerName: is 'string' although the ReactNode form that we use in our column value filter implementation continues to work fine. Given that the filter is an implementation class and continues to work well, I see no reason for immediate change, but we should probably respect agGrid's specified string type in our Column and ColumnGroup class. |
Not sure if needs to be called out as a breaking change. we could canvas people to see if it is being used to return ReactNodes elsewhere |
I don't understand the need to change the If there's no actual issue with using ReactNodes, why can't we keep the current types and avoid the breaking change? I know of a few cases where we use icons for header names. |
Ah, I think I understand this better. The problem is really just for ColumnGroup, where we don't have a displayName to fall back on if the user is supplying a react Node for the header name. |
cmp/grid/columns/Column.ts
Outdated
@@ -98,7 +98,7 @@ export interface ColumnSpec { | |||
* User-facing text/element displayed in the Column header, or a function to produce the same. | |||
* Defaulted from `displayName`. | |||
*/ | |||
headerName?: ColumnHeaderNameFn | ReactNode; | |||
headerName?: ColumnHeaderNameFn | string; |
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.
Let's undo this change, headerName can be ReactNode again
Hoist P/R Checklist
Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.
develop
branch as of last change.breaking-change
label + CHANGELOG if so.If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.