Iview's select component search function searches both label and value

html:

<i-select v-model="companyId" clearable filterable>
    <i-option v-for="item in managements"
              :value="item.companyId"
              :key="item.companyId">
        {{ item.shortName }}
    </i-option>
</i-select>

js:

[
    {companyId: 6, shortName: ""},
    {companyId: 7, shortName: ""},
    {companyId: 8, shortName: ""},
    {companyId: 9, shortName: ""},
    {companyId: 10, shortName: ""},
    {companyId: 15, shortName: ""}
]

screenshot above:

clipboard.png
searching for "1" will also find out the items with 1 in companyId. Please take a look at

Apr.02,2021

Demo

  

after version 4.2, you can solve

by adding the filter-by-label attribute.
Menu