Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13462,12 +13462,10 @@ exports[`Collapsible nested table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -14651,12 +14649,10 @@ exports[`Collapsible nested table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -15370,12 +15366,10 @@ exports[`Collapsible nested table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -15735,12 +15729,10 @@ exports[`Collapsible nested table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -16100,12 +16092,10 @@ exports[`Collapsible nested table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -16465,12 +16455,10 @@ exports[`Collapsible nested table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -18399,12 +18387,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -19116,12 +19102,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -19540,12 +19524,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -20259,12 +20241,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -20624,12 +20604,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -20989,12 +20967,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down Expand Up @@ -21354,12 +21330,10 @@ exports[`Collapsible table 1`] = `
data-key={1}
data-label="Header cell"
key="1-cell"
title="one"
>
<td
data-key={1}
data-label="Header cell"
title="one"
>
one
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ export const collapsible = (

export const expandedRow = (colSpan) => {
const expandedRowFormatter = (value, { rowIndex, rowData, column: { extraParams: { contentId = 'expanded-content' } } }) => {
return {
...rowData.hasOwnProperty('parent') ? {
return rowData.hasOwnProperty('parent') && {
colSpan: colSpan,
children: <ExpandableRowContent id={contentId + rowIndex}>{value.title || value}</ExpandableRowContent>
} : value
};
}
}
};
return expandedRowFormatter;
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('Transformer functions', () => {
test('no parent', () => {
expect(
expandedRow(5)({ title: 'test' }, { rowData: {}, column: { extraParams: {} } })
).toMatchObject({ title: 'test' });
).toBe(false)
});
});

Expand Down