Fix: two dropdown-related UI fixes (#14717)

This commit is contained in:
shamoon authored and GitHub committed 2026-11-07 12:20:31 -08:00
1 parent 0736c07d8e
commit 2e0d92d8f5
3 files changed
+11 -2

No files matched your search

@@ -97,6 +97,7 @@ describe('SelectComponent', () => {
let createNewVal
component.createNew.subscribe((v) => (createNewVal = v))
expect(component.allowCreateNew).toBeTruthy()
const closeSpy = jest.spyOn(component.ngSelectComponent, 'close')
component.onSearch({ term: 'foo' })
component.addItem(undefined)
expect(createNewVal).toEqual('foo')
@@ -105,6 +106,8 @@ describe('SelectComponent', () => {
component.onSearch({ term: 'baz' })
component.clickNew()
expect(createNewVal).toEqual('baz')
// dropdown should close when creating a new item so it isn't left open behind the modal
expect(closeSpy).toHaveBeenCalled()
})
it('should search items by independent normalized terms', () => {