Skip to content

Commit

Permalink
Autocomplete: add change event (ElemeFE#17913)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz authored and CarterLi committed Apr 14, 2020
1 parent 55f2f8b commit 7fbf23c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/docs/en-US/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ Attribute | Description | Type | Options | Default
| Event Name | Description | Parameters |
|----| ----| ----|
|select | triggers when a suggestion is clicked | suggestion being clicked |
| change | triggers when the icon inside Input value change | (value: string \| number) |

### Autocomplete Methods

Expand Down
1 change: 1 addition & 0 deletions examples/docs/es/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ export default {
| Nombre | Descripción | Parametros |
| ------ | ----------------------------------------------- | ------------------------------------------ |
| select | se dispara cuando se hace clic a una sugerencia | sugerencia en la que se está haciendo clic |
| change | se activa cuando cambia el valor de entrada | (value: string \| number) |

### Autocomplete Metodo

Expand Down
1 change: 1 addition & 0 deletions examples/docs/fr-FR/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ export default {
| Nom | Description | Paramètres |
|----| ----| ----|
| select | Se déclenche quand une suggestion est cliquée. | La suggestion sélectionnée. |
| change | Se déclenche quand la valeur change. | (value: string \ number) |

### Méthodes de l'autocomplétion

Expand Down
2 changes: 1 addition & 1 deletion packages/autocomplete/src/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
this.debouncedGetData(value);
},
handleChange(event) {
this.$emit('change', event);
this.$emit('change', event.target.value);
},
handleFocus(event) {
this.activated = true;
Expand Down

0 comments on commit 7fbf23c

Please sign in to comment.