mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
feat(Dropdown): add clear input key binding (#4002)
This commit is contained in:
parent
7529764482
commit
dd74bcd821
2 changed files with 17 additions and 0 deletions
|
@ -89,6 +89,14 @@ describe('clear checks', () => {
|
|||
it('should have correct icon', () => {
|
||||
expect(wrapper.find('.p-dropdown-clear-icon').classes()).toContain('pi-discord');
|
||||
});
|
||||
|
||||
it('should clear with delete key', async () => {
|
||||
const updateModelSpy = vi.spyOn(wrapper.vm, 'updateModel');
|
||||
|
||||
await wrapper.find('.p-dropdown-label.p-inputtext').trigger('keydown', { code: 'Delete' });
|
||||
expect(updateModelSpy).toHaveBeenCalledOnce();
|
||||
expect(updateModelSpy).toHaveBeenCalledWith(expect.any(KeyboardEvent), null);
|
||||
});
|
||||
});
|
||||
|
||||
describe('editable checks', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue