Skip to content

Commit

Permalink
fix(react): stop passing selectionMode through as a prop (#5908)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Black <josh@josh.black>
  • Loading branch information
s100 and joshblack committed Apr 23, 2020
1 parent 844bfcc commit 14868eb
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 14868eb

Please sign in to comment.