feat(InputMenu): emit remove-tag event (#4511)

This commit is contained in:
J-Michalek
2025-07-16 22:28:45 +02:00
committed by GitHub
parent bb99345f5b
commit 6ca7c8b7bf
2 changed files with 14 additions and 5 deletions

View File

@@ -108,6 +108,13 @@ describe('InputMenu', () => {
await input.vm.$emit('update:open', false)
expect(wrapper.emitted()).toMatchObject({ blur: [[{ type: 'blur' }]] })
})
test('remove-tag event', async () => {
const wrapper = mount(InputMenu, { props: { modelValue: ['Option 1'], items: ['Option 1', 'Option 2'], multiple: true } })
const input = wrapper.findComponent({ name: 'TagsInputRoot' })
await input.vm.$emit('remove-tag', 'Option 1')
expect(wrapper.emitted()).toMatchObject({ 'remove-tag': [['Option 1']] })
})
})
describe('form integration', async () => {