fix(ui): search in select fields with filterOptions (#13397)
Fixes https://github.com/payloadcms/payload/issues/13236
This commit is contained in:
@@ -110,4 +110,16 @@ describe('Select', () => {
|
||||
await field.click({ delay: 100 })
|
||||
await expect(options.locator('text=One')).toBeHidden()
|
||||
})
|
||||
|
||||
test('should retain search when reducing options', async () => {
|
||||
await page.goto(url.create)
|
||||
const field = page.locator('#field-selectWithFilteredOptions')
|
||||
await field.click({ delay: 100 })
|
||||
const options = page.locator('.rs__option')
|
||||
await expect(options.locator('text=One')).toBeVisible()
|
||||
await expect(options.locator('text=Two')).toBeVisible()
|
||||
await field.locator('input').fill('On')
|
||||
await expect(options.locator('text=One')).toBeVisible()
|
||||
await expect(options.locator('text=Two')).toBeHidden()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user