vue-select icon indicating copy to clipboard operation
vue-select copied to clipboard

:filterable="false" + :taggable="true" results in client-side filter

Open lucianholt97 opened this issue 4 years ago • 2 comments

Describe the bug When using service-based filtering with :filterable="false" to prevent client-side filtering this option is omitted when taggable is set to true. Since I am filtering based on multiple criteria on the server this results in very bad ux since the user does not see available options correctly.

To Reproduce Steps to reproduce the behavior:

  1. Set :filterable="false"
  2. Set :taggable="true"
  3. Use server-side filtering based on multiple criteria
  4. See error

Expected behavior The filterable option should be more important than the taggable option. If I want to get the current behavior I can still set filterable to true

Code Reference https://github.com/sagalbot/vue-select/blob/6e1c0dbcbd9971e5ec3a8260d5e035e6c53b8b08/src/components/Select.vue#L1160

lucianholt97 avatar Mar 31 '21 09:03 lucianholt97

As a workaround, you can set the filterBy prop to a function that always returns true: () => true

FloEdelmann avatar Jun 09 '21 14:06 FloEdelmann

As @FloEdelmann mentioned, you can definitely use filterBy for this.

The solution proposed in #1399 breaks an existing test:

should select an existing option if the search string matches an objects label from options when filter-options is false

image

sagalbot avatar Oct 18 '21 17:10 sagalbot