feat: when a value is pasted or any other string is typed, default to equals (#43611)

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Right now when users type a value or paste a value after selecting a
column on the new filter bar, it kinda just fails. This just allows them
to default to equals and continue


https://github.com/user-attachments/assets/6af52c1d-3f6a-4bdb-8e22-61d7e5a756ae
This commit is contained in:
Ali Waseem authored and GitHub committed 2026-03-11 08:28:01 -06:00
1 parent 7157fa3710
commit 0e96bf20a1
7 files changed
+201 -37

No files matched your search

+32
View File
@@ -371,6 +371,38 @@ test.describe('Filter Bar', () => {
}
})
test('Enter on equals fallback applies filter and returns focus to freeform', async ({
page,
ref,
}) => {
const tableName = `${tableNamePrefix}_op_default_equals`
const columnName = 'name'
await createTable(tableName, columnName, [{ name: 'forgecode' }, { name: 'other' }])
try {
await setupFilterBarPage(page, ref, toUrl(`/project/${ref}/editor?schema=public`))
await navigateToTable(page, ref, tableName)
await selectColumnFilter(page, columnName)
const operatorInput = page.getByTestId(`filter-operator-${columnName}`)
await operatorInput.fill('forgecode')
await expect(page.getByText('Equals: "forgecode"')).toBeVisible()
const rowsWaiter = createApiResponseWaiter(page, 'pg-meta', ref, 'query?key=table-rows-')
await page.keyboard.press('Enter')
await rowsWaiter
await expect(getFilterBarInput(page)).toBeFocused()
await expect(page.getByRole('gridcell', { name: 'forgecode' })).toBeVisible()
await expect(page.getByRole('gridcell', { name: 'other' })).not.toBeVisible()
} finally {
await dropTable(tableName)
}
})
test('Backspace on empty operator removes condition', async ({ page, ref }) => {
const tableName = `${tableNamePrefix}_op_bksp`
const columnName = 'name'