|
40 | 40 | <component :is="childComponents.Deselect" />
|
41 | 41 | </button>
|
42 | 42 |
|
43 |
| - <slot name="open-indicator-icon"> |
44 |
| - <component :is="childComponents.OpenIndicator" v-bind="scope.openIndicator.attributes"/> |
| 43 | + <slot name="open-indicator-icon" v-bind="scope.openIndicator"> |
| 44 | + <component :is="childComponents.OpenIndicator" v-if="!noDrop" v-bind="scope.openIndicator.attributes"/> |
45 | 45 | </slot>
|
46 | 46 |
|
47 | 47 | <slot name="spinner" v-bind="scope.spinner">
|
|
562 | 562 | this.$el,
|
563 | 563 | this.searchEl,
|
564 | 564 | this.$refs.toggle.$el,
|
565 |
| - this.$refs.openIndicator.$el, |
566 |
| - // the line below is a bit gross, but required to support IE11 without adding polyfills |
567 |
| - ...Array.prototype.slice.call(this.$refs.openIndicator.$el.childNodes) |
568 | 565 | ];
|
569 | 566 |
|
| 567 | + if (typeof this.$refs.openIndicator !== 'undefined') { |
| 568 | + toggleTargets.push( |
| 569 | + this.$refs.openIndicator.$el, |
| 570 | + // the line below is a bit gross, but required to support IE11 without adding polyfills |
| 571 | + ...Array.prototype.slice.call(this.$refs.openIndicator.$el.childNodes), |
| 572 | + ); |
| 573 | + } |
| 574 | +
|
570 | 575 | if (toggleTargets.indexOf(target) > -1 || target.classList.contains('vs__selected')) {
|
571 | 576 | if (this.open) {
|
572 | 577 | this.searchEl.blur(); // dropdown will close on blur
|
|
890 | 895 | },
|
891 | 896 | openIndicator: {
|
892 | 897 | attributes: {
|
893 |
| - 'v-if': !this.noDrop, |
894 | 898 | 'ref': 'openIndicator',
|
895 | 899 | 'role': 'presentation',
|
896 | 900 | 'class': 'vs__open-indicator',
|
|
921 | 925 | return {
|
922 | 926 | 'vs--open': this.dropdownOpen,
|
923 | 927 | 'vs--single': !this.multiple,
|
924 |
| - 'vs--searching': this.searching, |
925 |
| - 'vs--searchable': this.searchable, |
| 928 | + 'vs--searching': this.searching && !this.noDrop, |
| 929 | + 'vs--searchable': this.searchable && !this.noDrop, |
926 | 930 | 'vs--unsearchable': !this.searchable,
|
927 | 931 | 'vs--loading': this.mutableLoading,
|
928 | 932 | 'vs--disabled': this.disabled
|
|
0 commit comments