Vuetify: [Bug Report] Combobox search term remains after clicking an item in the list

Created on 4 Sep 2019  路  9Comments  路  Source: vuetifyjs/vuetify

Environment

Vuetify Version: 2.0.13
Vue Version: 2.6.10
Browsers: Chrome 76.0.3809.132
OS: Android 9, Windows

Steps to reproduce

  • in the tags field, type gam
  • click on the proposed item: Gaming

Expected Behavior

  • 1 chip is added: Gaming
  • the search term gam is cleared

Actual Behavior

  • 1 chip is added: Gaming
  • the search term gam remains in the text input

Reproduction Link

https://codepen.io/gotson/pen/GRKOoeb

VCombobox bug has workaround

All 9 comments

Found workaround on this

...
<VCombobox
    ...
    // Add these 2 attributes into the component
    :search-input.sync="searchInput"
    @change="searchInput = ''"
>
</VCombobox>

...
data() {
  return {
    ...
    searchInput: "",  
  }      
}

Thanks @wannfq, it works for both #8842 and #8841 (codepen)

According to this test, internalSearch should not be cleared. VCombobox is inherited from the VAutocomplete. Should their behavior be different in this regard?
https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VAutocomplete/__tests__/VAutocomplete2.spec.ts#L395

The workaround proposed by @wannfq does not work anymore for vuetify 2.1, is there an other workaround to fix it?

Duplicate of #6459

If you have any additional questions, please reach out to us in our Discord community.

6459 is for v-autocomplete and is just ux, not an "actual" problem. In v-combobox the remaining text gets unintentionally added as an item when the field is blurred. There's also a lot more issues opened in opposition to #5926 so I'd advocate for reverting #6342 altogether or at least making it optional.

Related w/ workaround: #6842

I can agree with that assessment. It would have to be introduced in a minor though.

Was this page helpful?
0 / 5 - 0 ratings