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

"max" does not work properly when selecting all items in an option group

Open Yosi85 opened this issue 4 years ago • 1 comments

When using option groups it is possible to select more item than what is defined in max

Reproduction Link

https://jsfiddle.net/q4xb5ns6/

Steps to reproduce

Select the "test" group to select all its items

Expected behaviour

Only 2 items are selected because max is set to 2

Actual behaviour

All items are selected

Yosi85 avatar Feb 17 '21 10:02 Yosi85

To do that we can remove the last items of the value manually (using splice) if the value.length is greater than or equal to the max value on the @input event.

lehoaibaokg avatar Mar 04 '22 23:03 lehoaibaokg

@Yosi85 Please provide new production link as old one is not working.

akki-jat avatar Oct 27 '22 17:10 akki-jat

@akki-jat I've created a new jsFiddle as requested. https://jsfiddle.net/10wvLmng/1/

Yosi85 avatar Oct 28 '22 06:10 Yosi85

@Yosi85 - Thanks for quick response.

akki-jat avatar Oct 28 '22 11:10 akki-jat

@Yosi85 Please provide new production link as old one is not working.

Just add vue2 cdn url to resources, it will work

lehoaibaokg avatar Oct 30 '22 02:10 lehoaibaokg

@Yosi85 / @lehoaibaokg Opened the PR, please take a look.

https://github.com/shentao/vue-multiselect/pull/1580

akki-jat avatar Oct 30 '22 03:10 akki-jat

Thanks for fixing this. Any idea when 2.1.7 is going live?

Yosi85 avatar Nov 01 '22 10:11 Yosi85

Check out the discussion happening around the release here: https://github.com/shentao/vue-multiselect/discussions/1589

mattelen avatar Nov 01 '22 11:11 mattelen