diff --git a/javascripts/src/components/common/wizard/WizardPanel.spec.tsx b/javascripts/src/components/common/wizard/WizardPanel.spec.tsx index bbcb2564..bc65bd48 100644 --- a/javascripts/src/components/common/wizard/WizardPanel.spec.tsx +++ b/javascripts/src/components/common/wizard/WizardPanel.spec.tsx @@ -28,7 +28,7 @@ describe('WizardPanel', () => { ws.addTab('something', 'something label',{} ) ws.initialize() - const tree = shallow(<Component.WizardPanel tab={ws.tabsByName['something']}><hr/></Component.WizardPanel>) + const tree = shallow(<Component.WizardPanel tab={ws.tabsByName['something']} anotherProp={false}><hr/></Component.WizardPanel>) expect(toJson(tree)).toMatchSnapshot() diff --git a/javascripts/src/components/common/wizard/WizardPanel.tsx b/javascripts/src/components/common/wizard/WizardPanel.tsx index f9bc4fbf..31ab27c4 100644 --- a/javascripts/src/components/common/wizard/WizardPanel.tsx +++ b/javascripts/src/components/common/wizard/WizardPanel.tsx @@ -4,6 +4,7 @@ import { TabPanel } from "react-aria-tabpanel"; import { observer } from 'mobx-react' import { WizardTabPanelState} from './wizard_state'; import {computed} from 'mobx'; +import * as _ from 'lodash' export interface WizardTabPanelProps { @@ -26,9 +27,9 @@ export class WizardPanel extends React.Component<WizardPanelProps, {}> { } render() { - let props = this.props.props ? this.props.props : {} - return <TabPanel tabId={this.tab.id} active={this.isActive} - {...props} className="wizard-step"> + let props = _.omit(this.props, ['tab']) + return <TabPanel {...props} tabId={this.tab.id} active={this.isActive} + className="wizard-step"> {this.props.children} </TabPanel> } diff --git a/javascripts/src/components/common/wizard/__snapshots__/WizardPanel.spec.tsx.snap b/javascripts/src/components/common/wizard/__snapshots__/WizardPanel.spec.tsx.snap index ac2e521a..cf091e62 100644 --- a/javascripts/src/components/common/wizard/__snapshots__/WizardPanel.spec.tsx.snap +++ b/javascripts/src/components/common/wizard/__snapshots__/WizardPanel.spec.tsx.snap @@ -3,6 +3,7 @@ exports[`WizardPanel shallow render 1`] = ` <AriaTabPanel-TabPanel active={true} + anotherProp={false} className="wizard-step" tabId="tab1" tag="div"