0👍
You can’t query a component using the key in the findComponent()
method.
But you can fetch all components within your list, and then filter them like a regular array.
Just provide the right condition to find the item you want (usings its props, attrs or whatever)
const items = wrapper.findAllComponents(MyListItem)
const foundItem = items.wrappers.find(listItem => list.props('id') === 'theIdILookFor')
- [Vuejs]-Kendo Vue Charts Native CDN Install Errors
- [Vuejs]-Vue "Is not a function" problem in my todolist app
Source:stackexchange.com