In my Vue application with ElementUI, I have a drop down menu that needs to be explicitly closed after some logic is applied.
The process is as follows:
- User loads the page, selects a name from the drop-down - the name value is saved in the database
- User reloads the page, selects a different name, receives a pop-up asking if they want to save the new name
After confirming the choice in step 2, the new name is saved but the drop-down remains open. To ensure it closes, I need to implement additional logic to run when the user confirms their selection.
<div class="part">
<span class="for-label"> Employee: </span>
<el-select v-model="dataValue.assignedUser" filterable :disabled="notClick" @change="handle">
<el-option
v-for="(user, userIndex) in assignedOption"
:key="userIndex"
:label="user.userName"
:value="user.userEmail"
/>
</el-select>
</div>
This issue started occurring only after adding the "filterable" attribute to the el-select element.