fix: select input not trigger change event
parent
ecc755b084
commit
8b3023e01f
|
@ -1 +1 @@
|
||||||
Subproject commit a24eac222a88e0c8fecfa739b07656e7e5b82a15
|
Subproject commit 05da262e31f9c6cc524154df13f5e2b05c20c1c8
|
|
@ -1,4 +1,4 @@
|
||||||
import { TransitionGroup } from 'vue';
|
import { TransitionGroup, withDirectives } from 'vue';
|
||||||
import KeyCode from '../_util/KeyCode';
|
import KeyCode from '../_util/KeyCode';
|
||||||
import PropTypes from '../_util/vue-types';
|
import PropTypes from '../_util/vue-types';
|
||||||
import classnames from '../_util/classNames';
|
import classnames from '../_util/classNames';
|
||||||
|
@ -49,6 +49,7 @@ import contains from '../vc-util/Dom/contains';
|
||||||
import { isIE, isEdge } from '../_util/env';
|
import { isIE, isEdge } from '../_util/env';
|
||||||
import isValid from '../_util/isValid';
|
import isValid from '../_util/isValid';
|
||||||
import { getDataAndAriaProps } from '../_util/util';
|
import { getDataAndAriaProps } from '../_util/util';
|
||||||
|
import antInput from '../_util/antInputDirective';
|
||||||
|
|
||||||
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';
|
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY';
|
||||||
|
|
||||||
|
@ -639,7 +640,7 @@ const Select = {
|
||||||
if (value.length) {
|
if (value.length) {
|
||||||
hidden = true;
|
hidden = true;
|
||||||
}
|
}
|
||||||
if (value.length === 1 && state._value && !isValid(state._value[0])) {
|
if (isCombobox(props) && value.length === 1 && state._value && !isValid(state._value[0])) {
|
||||||
hidden = false;
|
hidden = false;
|
||||||
}
|
}
|
||||||
const placeholder = props.placeholder;
|
const placeholder = props.placeholder;
|
||||||
|
@ -781,18 +782,13 @@ const Select = {
|
||||||
// Add space to the end of the inputValue as the width measurement tolerance
|
// Add space to the end of the inputValue as the width measurement tolerance
|
||||||
return (
|
return (
|
||||||
<div class={`${props.prefixCls}-search__field__wrap`} onClick={this.inputClick}>
|
<div class={`${props.prefixCls}-search__field__wrap`} onClick={this.inputClick}>
|
||||||
{cloneElement(inputElement, {
|
{cloneElement(withDirectives(inputElement, [[antInput]]), {
|
||||||
disabled: props.disabled,
|
disabled: props.disabled,
|
||||||
...(inputElement.props || {}),
|
...(inputElement.props || {}),
|
||||||
disabled: props.disabled,
|
disabled: props.disabled,
|
||||||
value: inputValue,
|
value: inputValue,
|
||||||
class: inputCls,
|
class: inputCls,
|
||||||
ref: this.saveInputRef,
|
ref: this.saveInputRef,
|
||||||
// directives: [
|
|
||||||
// {
|
|
||||||
// name: 'ant-input',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
onInput: this.onInputChange,
|
onInput: this.onInputChange,
|
||||||
onKeydown: chaining(
|
onKeydown: chaining(
|
||||||
this.onInputKeydown,
|
this.onInputKeydown,
|
||||||
|
|
Loading…
Reference in New Issue