2

İs that possible to set some rules for disable or enable case sensitive searchable v-select

<v-select label="name" taggable v-model="selectedAgency"
          :options="agencyList" 
          :on-change="onAgencyChange" 
          placeholder="Agency"/>"></v-select>

Official page: https://sagalbot.github.io/vue-select/

Maxim Shoustin
  • 77,483
  • 27
  • 203
  • 225
radeveloper
  • 926
  • 2
  • 12
  • 20

1 Answers1

0

At this point, no.

V-select converts everything to lowercase before the comparison. You can see this here https://github.com/sagalbot/vue-select/blob/7a2fad6933c81130e5384426c68f0607c7d86308/src/components/Select.vue#L850

If you want to make it case sensitive, and are just looking for a quick fix for your project, you could modify those lines and remove the toLowerCase() call.

Alternatively, if you think this is a prop that should be supported, consider making a pull request and calling toLowerCase() conditionally based on some prop you pass down.

Hopefully that helps. Try making those changes, if you still can't get it to work, post what you tried and maybe someone can help.

lmiller1990
  • 925
  • 2
  • 12
  • 22
  • Thank you xenetics. Actually my main problem is that some of the language-specific letters cause problems during the search. For example: Şş, Iı, İi, Üü, Ğğ,Çç. So I am looking for the right way to solve this problem. – radeveloper Aug 16 '17 at 13:50
  • Those letters shouldn't cause any problems. `'Ğ'.toLowerCase()` gives me 'ğ' and so on. So if you make some small modifications to the library it should work fine. Smply removing `toLowerCase()` checks from the library *is* the right way to solve the problem. Or, making sure the input to the v-search are all lowercase at first (aka preprocess) then the v-select library will work as is. – lmiller1990 Aug 16 '17 at 15:05