Skip to content

fix(DataTableSkeleton): adjust TypeScript types to match behavior#14114

Merged
kodiakhq[bot] merged 5 commits into
carbon-design-system:mainfrom
lewandom:datatableskeleton-ts-fixes
Jul 6, 2023
Merged

fix(DataTableSkeleton): adjust TypeScript types to match behavior#14114
kodiakhq[bot] merged 5 commits into
carbon-design-system:mainfrom
lewandom:datatableskeleton-ts-fixes

Conversation

@lewandom

Copy link
Copy Markdown
Contributor

Fixes TypeScript compilation errors such as the one below when using the DataTableSkeleton:

Type error: Type '{ headers: { key: string; header: string; }[]; showHeader: boolean; }' is missing the following properties from type '{ [x: string]: any; headers: any; rowCount: any; columnCount: any; zebra: any; compact: any; className: any; showHeader: any; showToolbar: any; }': rowCount, columnCount, zebra, compact, and 2 more.

Changelog

Changed

  • Make DataTableSkeletonProps fields optional
  • Have DataTableSkeletonProps extend TableHTMLAttributes
  • Extract DataTableSkeletonHeader interface

Testing / Reviewing

Automated tests should pass. No behavior change should be seen in story book. DataTableSkeleton usage in TypeScript setup should follow component behavior.

@lewandom lewandom requested a review from a team as a code owner June 28, 2023 20:15
@lewandom lewandom requested review from alisonjoseph and guidari June 28, 2023 20:15
@netlify

netlify Bot commented Jun 28, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 945ab1f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64a6f259dfaac50008f9242d
😎 Deploy Preview https://deploy-preview-14114--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify

netlify Bot commented Jun 29, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 945ab1f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64a6f2598c7a0c000800c6b0
😎 Deploy Preview https://deploy-preview-14114--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@guidari guidari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks for contributing!

@andreancardona andreancardona left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good thank you!

@kodiakhq kodiakhq Bot merged commit 84cdca4 into carbon-design-system:main Jul 6, 2023
@lewandom lewandom deleted the datatableskeleton-ts-fixes branch November 6, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants