Vue-multiselect: Single select with :clear-on-select='false' and :preserve-search="true" throw warn "ClearOnSelect and Multiple props can’t be both set to false."

Created on 13 Jun 2018  Â·  7Comments  Â·  Source: shentao/vue-multiselect

Why single select can't be with :clear-on-select='false' ?

Reproduction Link

https://jsfiddle.net/karakum/jqofkzxc/3454/

Steps to reproduce

  1. Run as is
  2. Open select
  3. Type search string
  4. Select any item

Expected behaviour 1

First option must stay modified

Actual behaviour 1

First option modified as expected, but:
Console warn: ClearOnSelect and Multiple props can’t be both set to false.

Modify :clear-on-select to true and repeat scenario.

Expected behaviour 2

First option must stay modified

Actual behaviour 2

First option has been reset with suffix (reset) because search query reset on select

enhancement

Most helpful comment

@akki-jat but I need to clear-on-select=FALSE with single select to prevent clear of search string after select item

All 7 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Any suggest?

@akki-jat but I need to clear-on-select=FALSE with single select to prevent clear of search string after select item

@karakum I also don't think there is any connection betwwen clear-on-select and multiple prop.
But author would know better, so I am adding @shentao in loop.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is a legacy warning when the single-selection was using the input itself to display the value. After the recent changes (the single value has it’s own span), this no longer seems needed. Feel free to provide a PR that will remove the warning.

@shentao merge PR please

Was this page helpful?
0 / 5 - 0 ratings