Skip to content

Commit

Permalink
fix(react-table): Fix error Unknown event handler property `onCollaps…
Browse files Browse the repository at this point in the history
…e`. It will be ignored.
  • Loading branch information
kunyan committed Jun 10, 2019
1 parent 979f13f commit da2b520
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { mapOpenedRows } from './utils/headerUtils';
// eslint-disable-next-line react/prefer-stateless-function
class BodyWrapper extends React.Component {
render() {
const { mappedRows, tbodyRef, ...props } = this.props;
const { mappedRows, tbodyRef, rows, onCollapse, ...props } = this.props;
if (mappedRows && mappedRows.some(row => row.hasOwnProperty('parent'))) {
return (
<React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2406,8 +2406,6 @@ exports[`Actions table 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -11464,8 +11462,6 @@ exports[`Cell header table 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -17731,8 +17727,6 @@ exports[`Collapsible nested table 1`] = `
<tbody
className=""
key="tbody-0"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -19293,8 +19287,6 @@ exports[`Collapsible nested table 1`] = `
<tbody
className=""
key="tbody-1"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -20324,8 +20316,6 @@ exports[`Collapsible nested table 1`] = `
<tbody
className=""
key="tbody-2"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -20824,8 +20814,6 @@ exports[`Collapsible nested table 1`] = `
<tbody
className=""
key="tbody-3"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -21324,8 +21312,6 @@ exports[`Collapsible nested table 1`] = `
<tbody
className=""
key="tbody-4"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -21824,8 +21810,6 @@ exports[`Collapsible nested table 1`] = `
<tbody
className=""
key="tbody-5"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -24785,8 +24769,6 @@ exports[`Collapsible table 1`] = `
<tbody
className="pf-m-expanded"
key="tbody-0"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -25816,8 +25798,6 @@ exports[`Collapsible table 1`] = `
<tbody
className=""
key="tbody-1"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -26316,8 +26296,6 @@ exports[`Collapsible table 1`] = `
<tbody
className=""
key="tbody-2"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -27347,8 +27325,6 @@ exports[`Collapsible table 1`] = `
<tbody
className=""
key="tbody-3"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -27847,8 +27823,6 @@ exports[`Collapsible table 1`] = `
<tbody
className=""
key="tbody-4"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -28347,8 +28321,6 @@ exports[`Collapsible table 1`] = `
<tbody
className=""
key="tbody-5"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -28847,8 +28819,6 @@ exports[`Collapsible table 1`] = `
<tbody
className=""
key="tbody-6"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -30271,8 +30241,6 @@ exports[`Compound Expandable table 1`] = `
<tbody
className="pf-m-expanded"
key="tbody-0"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -30748,8 +30716,6 @@ exports[`Compound Expandable table 1`] = `
<tbody
className=""
key="tbody-1"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -33507,8 +33473,6 @@ exports[`Header width table 1`] = `
<tbody
className=""
key="tbody-0"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -34806,8 +34770,6 @@ exports[`Header width table 1`] = `
<tbody
className=""
key="tbody-1"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -35671,8 +35633,6 @@ exports[`Header width table 1`] = `
<tbody
className=""
key="tbody-2"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -36102,8 +36062,6 @@ exports[`Header width table 1`] = `
<tbody
className=""
key="tbody-3"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -36533,8 +36491,6 @@ exports[`Header width table 1`] = `
<tbody
className=""
key="tbody-4"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -36964,8 +36920,6 @@ exports[`Header width table 1`] = `
<tbody
className=""
key="tbody-5"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -39867,8 +39821,6 @@ exports[`Selectable table 1`] = `
<tbody
className=""
key="tbody-0"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -41354,8 +41306,6 @@ exports[`Selectable table 1`] = `
<tbody
className=""
key="tbody-1"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -42350,8 +42300,6 @@ exports[`Selectable table 1`] = `
<tbody
className=""
key="tbody-2"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -42855,8 +42803,6 @@ exports[`Selectable table 1`] = `
<tbody
className=""
key="tbody-3"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -43360,8 +43306,6 @@ exports[`Selectable table 1`] = `
<tbody
className=""
key="tbody-4"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -43865,8 +43809,6 @@ exports[`Selectable table 1`] = `
<tbody
className=""
key="tbody-5"
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -47283,8 +47225,6 @@ exports[`Simple Actions table 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -58301,8 +58241,6 @@ exports[`Simple table aria-label 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -64298,8 +64236,6 @@ exports[`Simple table caption 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -70299,8 +70235,6 @@ exports[`Simple table header 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -76347,8 +76281,6 @@ exports[`Sortable table 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -82402,8 +82334,6 @@ exports[`Table variants Breakpoint - grid 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -88457,8 +88387,6 @@ exports[`Table variants Breakpoint - grid-lg 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -94512,8 +94440,6 @@ exports[`Table variants Breakpoint - grid-md 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -100567,8 +100493,6 @@ exports[`Table variants Breakpoint - grid-xl 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -106622,8 +106546,6 @@ exports[`Table variants Breakpoint - null 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down Expand Up @@ -112677,8 +112599,6 @@ exports[`Table variants Size - compact 1`] = `
>
<tbody
className=""
onCollapse={null}
rows={Array []}
>
<BodyRow
columns={
Expand Down

0 comments on commit da2b520

Please sign in to comment.