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

feat(component): use ReactNode for table actions #478

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

deini
Copy link
Member

@deini deini commented Dec 9, 2020

Fixes issue of re-rendering custom table actions.

Repro: https://codesandbox.io/s/priceless-hill-dus8q?file=/src/App.tsx (type on the input)

BREAKING CHANGE:
Table and StatefulTable actions prop changed from expecint a
React.ComponentType to React.ReactNode.

Old:

<Table actions={() => <Button>Some Action</Button>} />

New:

<Table actions={<Button>Some Action</Button>} />

@deini deini requested a review from a team as a code owner December 9, 2020 16:38
BREAKING CHANGE:
Table and StatefulTable `actions` prop changed from expecint a
React.ComponentType to React.ReactNode.

Old:
```jsx
<Table actions={() => <Button>Some Action</Button>} />
```

New:
```jsx
<Table actions={<Button>Some Action</Button>} />
```
@deini deini force-pushed the feat/table-actions branch from 6789b98 to 48d1666 Compare December 9, 2020 16:48
@deini deini merged commit 8622402 into bigcommerce:master Dec 9, 2020
@deini deini deleted the feat/table-actions branch December 9, 2020 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants