Skip to content

Commit

Permalink
fix(react): stop passing selectionMode through as a prop (carbon-desi…
Browse files Browse the repository at this point in the history
…gn-system#5908)

Co-authored-by: Josh Black <josh@josh.black>
  • Loading branch information
s100 and joshblack committed Apr 23, 2020
1 parent f929139 commit 3c3c76d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ describe('ContentSwitcher', () => {
it('should apply extra classes passed to it', () => {
expect(wrapper.hasClass('extra-class')).toEqual(true);
});

it('should not have a selectionMode prop', () => {
expect('selectionMode' in wrapper.props()).toEqual(false);
});
});

describe('Allow initial state to draw from props', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default class ContentSwitcher extends React.Component {
children,
className,
selectedIndex, // eslint-disable-line no-unused-vars
selectionMode, // eslint-disable-line no-unused-vars
...other
} = this.props;

Expand Down
6 changes: 6 additions & 0 deletions packages/react/src/components/Tabs/Tabs-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ describe('Tabs', () => {
.hasClass(`${prefix}--tabs--container`)
).toBe(true);
});

it('has no selectionMode prop', () => {
expect(
'selectionMode' in wrapper.find(`.${prefix}--tabs`).props()
).toBe(false);
});
});

describe('Trigger (<div>)', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export default class Tabs extends React.Component {
role,
type,
onSelectionChange,
selectionMode, // eslint-disable-line no-unused-vars
tabContentClassName,
...other
} = this.props;
Expand Down

0 comments on commit 3c3c76d

Please sign in to comment.