Skip to content

Commit

Permalink
fix(Table): React.Fragment is supported in 16.2.4, use [] instead
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed May 31, 2019
1 parent a8c373a commit aec5368
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions scripts/server/tpls/demo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
}
</script>
<script src="//shadow.elemecdn.com/npm/babel-polyfill@6.26.0/dist/polyfill.min.js"></script>
<script src="//shadow.elemecdn.com/npm/react@16.8.3/umd/react.development.js"></script>
<script src="//shadow.elemecdn.com/npm/react-dom@16.8.3/umd/react-dom.development.js"></script>
<script src="//shadow.elemecdn.com/npm/react@16.0.0/umd/react.development.js"></script>
<script src="//shadow.elemecdn.com/npm/react-dom@16.0.0/umd/react-dom.development.js"></script>
<script src="//shadow.elemecdn.com/npm/moment@2.24.0/min/moment-with-locales.js"></script>
<script>
window.mountNode = document.getElementById('mount-node');
Expand Down
4 changes: 2 additions & 2 deletions scripts/server/tpls/theme.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</style>
<% } %>
<script src="//shadow.elemecdn.com/npm/babel-polyfill@6.26.0/dist/polyfill.min.js"></script>
<script src="//shadow.elemecdn.com/npm/react@16.8.3/umd/react.development.js"></script>
<script src="//shadow.elemecdn.com/npm/react-dom@16.8.3/umd/react-dom.development.js"></script>
<script src="//shadow.elemecdn.com/npm/react@16.0.0/umd/react.development.js"></script>
<script src="//shadow.elemecdn.com/npm/react-dom@16.0.0/umd/react-dom.development.js"></script>
<script src="//shadow.elemecdn.com/npm/moment@2.24.0/min/moment-with-locales.js"></script>
</head>
<body>
Expand Down
29 changes: 14 additions & 15 deletions src/table/selection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,20 @@ export default function selection(BaseComponent) {
if (checked) {
indeterminate = false;
}
return (
<React.Fragment>
{mode === 'multiple' ? (
<Checkbox
indeterminate={indeterminate}
aria-label={locale.selectAll}
checked={checked}
onChange={onChange}
{...attrs}
{...userAttrs}
/>
) : null}
{rowSelection.titleAddons && rowSelection.titleAddons()}
</React.Fragment>
);
return [
mode === 'multiple' ? (
<Checkbox
key="_total"
indeterminate={indeterminate}
aria-label={locale.selectAll}
checked={checked}
onChange={onChange}
{...attrs}
{...userAttrs}
/>
) : null,
rowSelection.titleAddons && rowSelection.titleAddons(),
];
};

renderSelectionBody = (value, index, record) => {
Expand Down

0 comments on commit aec5368

Please sign in to comment.