From c32b08dd133763c65c02c5a2b1f116e1d5520eda Mon Sep 17 00:00:00 2001 From: Jeff Sagal Date: Wed, 30 Nov 2022 11:36:20 -0800 Subject: [PATCH] remove list-header and list-footer slots BREAKING: list-header and list-footer have been removed. If you were using these slots, you can instead compose your own dropdown menu. --- src/components/Select.vue | 2 -- tests/unit/Selecting.spec.js | 2 +- tests/unit/Slots.spec.js | 36 ------------------------------------ 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/src/components/Select.vue b/src/components/Select.vue index 1064a97..ae5267a 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -84,7 +84,6 @@ -
  • -
    diff --git a/tests/unit/Selecting.spec.js b/tests/unit/Selecting.spec.js index f37749b..328fe6b 100755 --- a/tests/unit/Selecting.spec.js +++ b/tests/unit/Selecting.spec.js @@ -1,5 +1,5 @@ import { it, describe, expect, vi, beforeEach, afterEach } from 'vitest' -import { mount, mount } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import VueSelect from '@/components/Select.vue' import typeAheadPointer from '@/mixins/typeAheadPointer.js' import { mountDefault } from '@tests/helpers.js' diff --git a/tests/unit/Slots.spec.js b/tests/unit/Slots.spec.js index ea397be..317de50 100644 --- a/tests/unit/Slots.spec.js +++ b/tests/unit/Slots.spec.js @@ -123,40 +123,4 @@ describe('Scoped Slots', () => { 'deselect', ]) }) - - test('list-header slot props', async () => { - const header = vi.fn() - const Select = mountDefault( - {}, - { - slots: { 'list-header': header }, - } - ) - Select.vm.open = true - await Select.vm.$nextTick() - expect(Object.keys(header.mock.calls[0][0])).toEqual([ - 'search', - 'loading', - 'searching', - 'filteredOptions', - ]) - }) - - test('list-footer slot props', async () => { - const footer = vi.fn() - const Select = mountDefault( - {}, - { - slots: { 'list-footer': footer }, - } - ) - Select.vm.open = true - await Select.vm.$nextTick() - expect(Object.keys(footer.mock.calls[0][0])).toEqual([ - 'search', - 'loading', - 'searching', - 'filteredOptions', - ]) - }) })