Element UI version
2.4.1
OS/Browsers version
All
Vue version
2.5.17-beta.0
Reproduction Link
https://jsfiddle.net/cj5ea28k/4/
Steps to reproduce
<el-form label-width="200px">
<el-form-item label="Click me 1" for="input1">
<el-input id="input1"></el-input>
</el-form-item>
<el-form-item label="Click me 2" for="input2">
<el-autocomplete id="input2" v-model="state1" :fetch-suggestions="querySearch" placeholder="Please Input"></el-autocomplete>
</el-form-item>
</el-form>
Click on the label "Click me 2".
What is Expected?
Clicking on the Label "Click me 2" should put the focus into the autocomplete field.
What is actually happening?
ElAutocomplete does not pass down the id prop to the ElInput (it generates one itself for the ElInput). Thus clicking on the label does nothing. You also have no reliable way to predict the generated id because it uses a random number.