mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Rename mode name
This commit is contained in:
parent
5eaa03b4ea
commit
6de4b00815
@ -121,7 +121,7 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, {}>
|
||||
<Select
|
||||
{...this.props}
|
||||
className={cls}
|
||||
mode={Select.COMBOBOX_MODE}
|
||||
mode={Select.SECRET_COMBOBOX_MODE_DO_NOT_USE}
|
||||
optionLabelProp={optionLabelProp}
|
||||
getInputElement={this.getInputElement}
|
||||
notFoundContent={notFoundContent}
|
||||
|
@ -37,7 +37,7 @@ describe('Select', () => {
|
||||
|
||||
it('should not have default notFoundContent when mode is combobox', () => {
|
||||
const wrapper = mount(
|
||||
<Select mode={Select.COMBOBOX_MODE} />
|
||||
<Select mode={Select.SECRET_COMBOBOX_MODE_DO_NOT_USE} />
|
||||
);
|
||||
wrapper.find('.ant-select').simulate('click');
|
||||
jest.runAllTimers();
|
||||
@ -47,7 +47,7 @@ describe('Select', () => {
|
||||
|
||||
it('should not have notFoundContent when mode is combobox and notFoundContent is set', () => {
|
||||
const wrapper = mount(
|
||||
<Select mode={Select.COMBOBOX_MODE} notFoundContent="not at all" />
|
||||
<Select mode={Select.SECRET_COMBOBOX_MODE_DO_NOT_USE} notFoundContent="not at all" />
|
||||
);
|
||||
wrapper.find('.ant-select').simulate('click');
|
||||
jest.runAllTimers();
|
||||
|
@ -91,7 +91,7 @@ export default class Select extends React.Component<SelectProps, {}> {
|
||||
static Option = Option as React.ClassicComponentClass<OptionProps>;
|
||||
static OptGroup = OptGroup as React.ClassicComponentClass<OptGroupProps>;
|
||||
|
||||
static COMBOBOX_MODE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
||||
static SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
||||
|
||||
static defaultProps = {
|
||||
prefixCls: 'ant-select',
|
||||
@ -138,7 +138,7 @@ export default class Select extends React.Component<SelectProps, {}> {
|
||||
|
||||
isCombobox() {
|
||||
const { mode } = this.props;
|
||||
return mode === 'combobox' || mode === Select.COMBOBOX_MODE;
|
||||
return mode === 'combobox' || mode === Select.SECRET_COMBOBOX_MODE_DO_NOT_USE;
|
||||
}
|
||||
|
||||
renderSelect = (locale: SelectLocale) => {
|
||||
|
Loading…
Reference in New Issue
Block a user