Skip to content
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

refactor: omit HTMLAttributes from grid column types #188

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

tomivirkki
Copy link
Member

Description

Grid column types don't need to expose properties such as style, draggable or onClick from HTMLAttributes. This PR omits most HTMLAttributes props from each Grid column type.

Before:
Screenshot 2023-12-19 at 10 39 57

After:
Screenshot 2023-12-19 at 10 38 45

Type of change

Refactor

export * from './generated/GridTreeColumn.js';

export type GridTreeColumnProps<TItem> = Partial<
Omit<_GridTreeColumnProps<TItem>, 'footerRenderer' | 'headerRenderer' | keyof OmittedGridColumnHTMLAttributes<TItem>>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we omit children and renderer here to align with other columns e.g. GridSortColumn?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Omitted them from the tree column also.

web-padawan
web-padawan previously approved these changes Dec 19, 2023
@tomivirkki tomivirkki merged commit 764496a into main Dec 19, 2023
1 check passed
@tomivirkki tomivirkki deleted the refactor/grid-column/omit-html-attributes branch December 19, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants