fix test case, #5999

This commit is contained in:
afc163 2017-05-03 15:33:40 +08:00
parent 290a779916
commit 9e018a7310
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ describe('AutoComplete with Custom Input Element Render', () => {
wrapper.find('textarea').simulate('change', { target: { value: '123' } });
const dropdownWrapper = mount(wrapper.find('Trigger').node.getComponent());
// should not filter data source defaultly
expect(dropdownWrapper.find('MenuItem').length).toBe(3);
expect(dropdownWrapper.find('MenuItem').props().value).toBe('12345');
});
});

View File

@ -45,6 +45,7 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
optionLabelProp: 'children',
choiceTransitionName: 'zoom',
showSearch: false,
filterOption: false,
};
getInputElement = () => {
@ -109,7 +110,6 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
optionLabelProp={optionLabelProp}
getInputElement={this.getInputElement}
notFoundContent={notFoundContent}
filterOption={false}
>
{options}
</Select>