fix(next): resolve filterOptions by path (#13779)
Follow up to #11375. When setting `filterOptions` on relationship or upload fields _that are nested within a named field_, those options won't be applied to the `Filter` component in the list view. This is because of how we key the results when resolving `filterOptions` on the server. Instead of using the field path as expected, we were using the field name, causing a failed lookup on the front-end. This also solves an issue where two fields with the same name would override each other's `filterOptions`, since field names alone are not unique. Unrelated: this PR also does some general housekeeping to e2e test helpers. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1211332845301583
This commit is contained in:
@@ -2,8 +2,8 @@ import type { BrowserContext, Locator, Page } from '@playwright/test'
|
||||
import type { PayloadTestSDK } from 'helpers/sdk/index.js'
|
||||
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { addListFilter } from 'helpers/e2e/addListFilter.js'
|
||||
import { addArrayRow } from 'helpers/e2e/fields/array/index.js'
|
||||
import { addListFilter } from 'helpers/e2e/filters/index.js'
|
||||
import { selectInput } from 'helpers/e2e/selectInput.js'
|
||||
import { toggleBlockOrArrayRow } from 'helpers/e2e/toggleCollapsible.js'
|
||||
import * as path from 'path'
|
||||
@@ -642,7 +642,6 @@ test.describe('Bulk Edit', () => {
|
||||
fieldLabel: 'ID',
|
||||
operatorLabel: 'equals',
|
||||
value: originalDoc.id,
|
||||
skipValueInput: false,
|
||||
})
|
||||
|
||||
// select first item
|
||||
|
||||
Reference in New Issue
Block a user