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

EuiTableRowCellProps TS defs fixes #1310

Merged
merged 3 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- `EuiToken` now exports enumerated constants for `SHAPES` and `COLORS` ([#1301](https://github.com/elastic/eui/pull/1301))
- Added mixins for `EuiCallOut` coloring and `EuiTooltip` styles ([#1305](https://github.com/elastic/eui/pull/1305))
- Improve TypeScript definitions for `EuiTableRowCellProps` ([#1310](https://github.com/elastic/eui/pull/1310))

## [`5.0.1`](https://github.com/elastic/eui/tree/v5.0.1)

Expand Down
9 changes: 8 additions & 1 deletion src/components/table/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,16 @@ declare module '@elastic/eui' {
*/

export interface EuiTableRowCellProps {
Copy link
Member

Choose a reason for hiding this comment

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

Question: why is EuiTableRowCellProps imported at the top of this file, while also exporting it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea...removed.

truncateText?: boolean;
align?: HorizontalAlignment;
hasActions?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Does colSpan need to go in here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but your comment made me realise that I was unioning the wrong props. I've fix that now so that colSpan and friends are correctly merged in.

Copy link
Member

Choose a reason for hiding this comment

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

Oh now I see, got it.

header?: string;
hideForMobile?: boolean;
isExpander?: boolean;
isMobileFullWidth?: boolean;
isMobileHeader?: boolean;
showOnHover?: boolean;
textOnly?: boolean;
truncateText?: boolean;
}

export const EuiTableRowCell: SFC<
Expand Down