diff --git a/.changeset/36169-filterbuilderfield-multiple.md b/.changeset/36169-filterbuilderfield-multiple.md new file mode 100644 index 00000000000..a4ae57bfe70 --- /dev/null +++ b/.changeset/36169-filterbuilderfield-multiple.md @@ -0,0 +1,13 @@ +--- +'@object-ui/app-shell': patch +'@object-ui/console': patch +--- + +fix(console): the view and page-block filter editor offers a multiple: true field only Contains, Does not contain and the empty checks + +Clause-②: no +Metadata-protocol: none + +A `select`, `lookup` or `user` field declared `multiple: true` holds a list. Studio's filter editor for a view's filter, a page's base filter and tab presets, and a related-list block's filter built its field list without `multiple`, so it offered Equals and Is any of on such a field, and the saved filter was refused by the data door with 400 `INVALID_FILTER` for every reader of that view. Every host that builds the editor's field list now carries the field's declared `multiple` (the generic metadata editor, the list-view and view-variant inspectors, the in-app view configuration panel and the page block inspector), and the shared filter builder offers such a field Contains, Does not contain, Is empty and Is not empty, the operators the other condition editors already give it. + +A single-value field of the same types keeps its operators. A stored Equals rule on a list-valued field still opens as its row, so it can be changed. No metadata key, value or default changes. diff --git a/ui/packages/app-shell/src/views/ViewConfigPanel.tsx b/ui/packages/app-shell/src/views/ViewConfigPanel.tsx index 23db9e8385d..aa23127fcee 100644 --- a/ui/packages/app-shell/src/views/ViewConfigPanel.tsx +++ b/ui/packages/app-shell/src/views/ViewConfigPanel.tsx @@ -139,8 +139,10 @@ type AuthoredSeed = * Map an Object definition's `fields` record into the inspector's flat field * catalog so it can render field-reference pickers (columns, groupByField, …) * without a network fetch. + * + * @internal exported for tests */ -function mapObjectFields(objectDef: ViewConfigPanelProps['objectDef']): ObjectFieldInfo[] { +export function mapObjectFields(objectDef: ViewConfigPanelProps['objectDef']): ObjectFieldInfo[] { const fields = objectDef.fields; if (!fields || typeof fields !== 'object') return []; return Object.entries(fields).map(([name, def]) => { @@ -150,6 +152,9 @@ function mapObjectFields(objectDef: ViewConfigPanelProps['objectDef']): ObjectFi label: typeof f.label === 'string' && f.label ? f.label : name, type: typeof f.type === 'string' ? f.type : 'text', hidden: f.hidden === true, + // The filter builder offers a list-valued column membership and + // the empty checks only (`operatorsForField`). + ...(f.multiple === true ? { multiple: true } : {}), }; }); } diff --git a/ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx b/ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx index dd365b4b82c..b8e640e13de 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx @@ -531,6 +531,34 @@ type ObjectCatalog = { actions: ObjectActionOption[]; }; +/** + * The field and action catalogs of one served object document, as the + * pickers read them. A field's declared `multiple: true` rides along: the + * `filter-builder` widget reads it to offer a list-valued column membership + * and the empty checks only (`operatorsForField`). + * + * @internal exported for tests + */ +export function objectCatalogOf(obj: { fields?: Record | Array } | null | undefined): ObjectCatalog { + const fieldOf = (name: unknown, f: any): ObjectFieldOption => ({ + name: name as string, + label: f?.label, + type: f?.type, + ...(f?.multiple === true ? { multiple: true } : {}), + }); + const raw = obj?.fields; + const list = Array.isArray(raw) + ? raw.map((f: any) => fieldOf(f?.name, f)) + : raw && typeof raw === 'object' + ? Object.entries(raw).map(([name, f]: [string, any]) => fieldOf(name, f)) + : []; + const rawActions = (obj as any)?.actions; + const acts = Array.isArray(rawActions) + ? rawActions.map((a: any) => ({ name: a?.name, label: a?.label, locations: a?.locations })).filter((a: any) => !!a.name) + : []; + return { fields: list.filter((f) => !!f.name), actions: acts }; +} + /** * A refusal the SERVER returned for this document, held against the draft * slices its issue paths named (`9073cf018`). @@ -1302,17 +1330,7 @@ function MetadataResourceEditPageImpl({ sourceObjectName ? async () => { const obj = (await client.get('object', sourceObjectName)) as { fields?: Record | Array } | null; - const raw = obj?.fields; - const list = Array.isArray(raw) - ? raw.map((f: any) => ({ name: f?.name, label: f?.label, type: f?.type })) - : raw && typeof raw === 'object' - ? Object.entries(raw).map(([name, f]: [string, any]) => ({ name, label: f?.label, type: f?.type })) - : []; - const rawActions = (obj as any)?.actions; - const acts = Array.isArray(rawActions) - ? rawActions.map((a: any) => ({ name: a?.name, label: a?.label, locations: a?.locations })).filter((a: any) => !!a.name) - : []; - return { fields: list.filter((f) => !!f.name), actions: acts }; + return objectCatalogOf(obj); } : null, [client, sourceObjectName], diff --git a/ui/packages/app-shell/src/views/metadata-admin/inspectors/PageBlockInspector.tsx b/ui/packages/app-shell/src/views/metadata-admin/inspectors/PageBlockInspector.tsx index 6b15d9dbc68..38236a39fb0 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/inspectors/PageBlockInspector.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/inspectors/PageBlockInspector.tsx @@ -76,7 +76,10 @@ function FilterRulesField({ label, objectName, value, onChange, disabled }: { const { fields, error } = useObjectFields(objectName); const id = React.useId(); const builderFields = React.useMemo( - () => fields.filter((f) => !f.hidden).map((f) => ({ name: f.name, label: f.label, type: f.type })), + () => fields + .filter((f) => !f.hidden) + // `multiple` decides the operators the builder offers a list-valued column. + .map((f) => ({ name: f.name, label: f.label, type: f.type, ...(f.multiple ? { multiple: true } : {}) })), [fields], ); return ( diff --git a/ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx b/ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx index d5477b002ee..d8909cdaedb 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx @@ -362,7 +362,9 @@ export function ViewVariantInspector({ fieldCatalog = { status: 'loading' }; } else { fieldCatalog = loaded( - objectFields.map((f) => ({ name: f.name, label: f.label, type: f.type })), + // `multiple` rides along for the filter's operator set: a list-valued + // column is offered membership and the empty checks only. + objectFields.map((f) => ({ name: f.name, label: f.label, type: f.type, ...(f.multiple ? { multiple: true } : {}) })), ); } // objectui#8167 — `none`, and the reason is recorded here rather than diff --git a/ui/packages/app-shell/src/views/metadata-admin/widgets.filterBuilderMultiple-36169.test.tsx b/ui/packages/app-shell/src/views/metadata-admin/widgets.filterBuilderMultiple-36169.test.tsx new file mode 100644 index 00000000000..9cfe3dab210 --- /dev/null +++ b/ui/packages/app-shell/src/views/metadata-admin/widgets.filterBuilderMultiple-36169.test.tsx @@ -0,0 +1,350 @@ +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. + +/** + * objectstack#36169 — Studio's view and page-block filter editor + * (`FilterBuilderField`, the `filter-builder` widget) hands the shared + * `FilterBuilder` each column's declared `multiple`, so a `select` / `lookup` / + * `user` declared `multiple: true` is offered what the data door answers on a + * list: `jsonColumnFilterOperators`' set (Contains, Does not contain, Is empty, + * Is not empty), read here from `operatorsForField`, never restated. Equality + * and `in` on a list are refused by the data door with 400 `INVALID_FILTER`. + * + * Pinned: + * - the widget: a `multiple: true` user / lookup / select column's REAL + * operator dropdown lists exactly the shared builder's answer; CONTROLS, the + * single-value user / select columns keep `Equals`; + * - read-back: a stored `equals` rule on such a column opens as its row and + * writes nothing (this editor has no Source fallback; the builder mounts the + * row's own operator beside the offered set so the author can change it); + * - every host that builds the widget's field list carries `multiple`: the + * generic editor's object catalog (`objectCatalogOf`), the runtime view + * panel's catalog (`mapObjectFields`), the view-variant inspector, and the + * page block's related-list filter. + * + * Direction: without `multiple` reaching the builder the multi-value columns + * keep their type's bucket (`Equals`, `Is any of`, …) and those cases are red; + * the single-value controls are green either way. + */ + +import '@testing-library/jest-dom/vitest'; +// The source loads these lazily; pay that load at collection, not inside a +// case's clocked window. +import '@objectstack/lint'; +import * as React from 'react'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react'; +import { jsonColumnFilterOperators, operatorsForField } from '@object-ui/components'; + +// The builder lives inside a Radix popover, which does not open in jsdom; the +// popover parts render inline (this directory's existing way of reaching it). +vi.mock('@object-ui/components', async () => { + const actual = await vi.importActual>('@object-ui/components'); + const Pass = ({ children }: { children?: unknown }) => children as never; + return { ...actual, Popover: Pass, PopoverTrigger: Pass, PopoverContent: Pass }; +}); + +/** The served `deal` object: three list-valued columns and three single-value controls. */ +const DEAL_FIELDS = { + name: { name: 'name', label: 'Name', type: 'text' }, + owners: { name: 'owners', label: 'Owners', type: 'user', multiple: true }, + accounts: { name: 'accounts', label: 'Accounts', type: 'lookup', reference: 'account', multiple: true }, + regions: { + name: 'regions', label: 'Regions', type: 'select', multiple: true, + options: [{ value: 'emea', label: 'EMEA' }, { value: 'apac', label: 'APAC' }], + }, + owner: { name: 'owner', label: 'Owner', type: 'user' }, + region: { + name: 'region', label: 'Region', type: 'select', + options: [{ value: 'emea', label: 'EMEA' }, { value: 'apac', label: 'APAC' }], + }, +} as const; +const DEAL = { name: 'deal', label: 'Deal', fields: DEAL_FIELDS }; + +const clients = vi.hoisted(() => { + const fake = { + get: async (type: string, name: string) => (type === 'object' && name === 'deal' ? DEAL_DOC() : undefined), + list: async () => [] as unknown[], + withPreviewDrafts() { + return this; + }, + }; + return { fake, current: fake as unknown }; +}); +// `vi.hoisted` runs before the module body, so the served document is read lazily. +function DEAL_DOC() { + return DEAL; +} +vi.mock('./useMetadata', async (importOriginal) => { + const mod = await importOriginal(); + return { ...mod, useMetadataClient: () => clients.current }; +}); + +import { MetadataCtx, type MetadataContextValue } from '@object-ui/react'; +import { MetadataClient } from '@object-ui/data-objectstack'; +import { WIDGETS } from './widgets'; +import { loaded } from './loadState'; +import { objectCatalogOf } from './ResourceEditPage'; +import { mapObjectFields } from '../ViewConfigPanel'; +import { ViewVariantInspector } from './inspectors/ViewVariantInspector'; +import { PageBlockInspector } from './inspectors/PageBlockInspector'; +import { ObjectListViewInspector, useObjectListViewDraft } from '../studio-design/ObjectListViewInspector'; +import type { Surface } from '../studio-design/navSurface'; + +afterEach(() => { + cleanup(); + clients.current = clients.fake; +}); + +const MULTI = ['owners', 'accounts', 'regions'] as const; +const FOUR = ['Contains', 'Does not contain', 'Is empty', 'Is not empty']; + +/** The operator labels the shared builder draws for these facts — its own answer. */ +const labelsFor = (type: string, multiple: boolean) => operatorsForField({ type, multiple }).map((o) => o.label); + +/** Open a REAL Radix dropdown by its trigger's index and read its option labels. */ +async function optionsOf(scope: HTMLElement, index: number): Promise { + const triggers = within(scope).getAllByRole('combobox'); + fireEvent.keyDown(triggers[index], { key: 'ArrowDown' }); + const options = await waitFor(() => { + const found = screen.getAllByRole('option').map((o) => o.textContent ?? ''); + expect(found.length).toBeGreaterThan(0); + return found; + }); + fireEvent.keyDown(document.activeElement ?? document.body, { key: 'Escape' }); + return options; +} + +async function pickFrom(scope: HTMLElement, index: number, label: string) { + const triggers = within(scope).getAllByRole('combobox'); + fireEvent.keyDown(triggers[index], { key: 'ArrowDown' }); + const option = await waitFor(() => { + const found = screen.getAllByRole('option').find((o) => o.textContent === label); + expect(found, `no "${label}" in the dropdown`).toBeTruthy(); + return found!; + }); + fireEvent.click(option); +} + +/** Add a row in the builder inside `scope`, point it at `label`, and read its operator dropdown. */ +async function offeredFor(scope: HTMLElement, label: string): Promise { + fireEvent.click(within(scope).getByRole('button', { name: 'Add filter' })); + await pickFrom(scope, 0, label); + return optionsOf(scope, 1); +} + +type Rule = { field: string; operator: string; value?: unknown }; + +const FilterWidget = WIDGETS['filter-builder']; + +function WidgetHost({ fields, initial, writes }: { + fields: ReturnType['fields']; + initial?: Rule[]; + writes: Array; +}) { + const [value, setValue] = React.useState(initial); + return ( +
+ { + writes.push(rules as Rule[] | undefined); + setValue(rules as Rule[] | undefined); + }} + /> +
+ ); +} + +/** The catalog the generic editor builds from the served object document. */ +const servedCatalog = () => objectCatalogOf(DEAL).fields; + +describe('the filter-builder widget offers a multiple: true column membership only (objectstack#36169)', () => { + it('the shared builder answers the JSON-column set for each list-valued column', () => { + for (const name of MULTI) { + const type = DEAL_FIELDS[name].type; + expect(jsonColumnFilterOperators({ type, multiple: true })).toEqual(['contains', 'not_contains', 'is_empty', 'is_not_empty']); + expect(labelsFor(type, true)).toEqual(FOUR); + } + }); + + it.each([ + ['Owners', 'user'], + ['Accounts', 'lookup'], + ['Regions', 'select'], + ])('%s (%s, multiple) is offered exactly the shared builder’s set', async (label, type) => { + render(); + expect(await offeredFor(screen.getByTestId('host'), label)).toEqual(labelsFor(type, true)); + }); + + it.each([ + ['Owner', 'user'], + ['Region', 'select'], + ])('CONTROL: %s (%s, single value) keeps its equality operators', async (label, type) => { + render(); + const offered = await offeredFor(screen.getByTestId('host'), label); + expect(offered).toContain('Equals'); + // The type's own bucket (the dropdown leaves out the nullness pair where it + // means what the empty checks mean), never the list set. + expect(labelsFor(type, false)).toEqual(expect.arrayContaining(offered)); + expect(offered).not.toEqual(FOUR); + }); + + it('a stored `equals` rule on a list-valued column opens as its row, writes nothing, and can be changed to membership', async () => { + const writes: Array = []; + render(); + const host = screen.getByTestId('host'); + expect(within(host).getByTestId('filter-builder-trigger')).toHaveTextContent('Owners'); + // The row's own operator stays mounted beside the offered set. + expect(await optionsOf(host, 1)).toEqual(['Equals', ...FOUR]); + expect(writes).toEqual([]); + }); +}); + +describe('every host that builds the filter-builder field list carries `multiple` (objectstack#36169)', () => { + it('the generic editor’s object catalog (`objectCatalogOf`) marks exactly the multiple: true columns, record or array form', () => { + const marked = (fields: Array<{ name: string; multiple?: boolean }>) => fields.filter((f) => f.multiple === true).map((f) => f.name); + expect(marked(objectCatalogOf(DEAL).fields)).toEqual([...MULTI]); + expect(marked(objectCatalogOf({ fields: Object.values(DEAL_FIELDS) }).fields)).toEqual([...MULTI]); + expect(objectCatalogOf(DEAL).fields.find((f) => f.name === 'owner')).toEqual({ name: 'owner', label: 'Owner', type: 'user' }); + }); + + it('the runtime view panel’s catalog (`mapObjectFields`) marks exactly the multiple: true columns', () => { + const fields = mapObjectFields(DEAL as never); + expect(fields.filter((f) => f.multiple === true).map((f) => f.name)).toEqual([...MULTI]); + }); + + it('the view-variant inspector’s filter offers a multiple: true column membership only', async () => { + function Harness() { + const [draft, setDraft] = React.useState>({ + name: 'deals', + object: 'deal', + list: { type: 'grid', data: { provider: 'object', object: 'deal' }, columns: ['name'] }, + }); + return ( +
+ ) => setDraft((d) => ({ ...d, ...patch }))} + onSelectionChange={() => {}} + onClearSelection={() => {}} + readOnly={false} + locale={'en-US'} + variantKey="list" + familyKey="list" + isHome={false} + objectFieldsOverride={mapObjectFields(DEAL as never)} + /> +
+ ); + } + render(); + const trigger = await screen.findByTestId('filter-builder-trigger'); + const builder = trigger.parentElement as HTMLElement; + expect(await offeredFor(builder, 'Owners')).toEqual(labelsFor('user', true)); + }); + + it('the page block’s related-list filter offers a multiple: true column membership only', async () => { + function Harness() { + const [draft, setDraft] = React.useState>({ + name: 'account_page', + type: 'record', + object: 'account', + kind: 'full', + regions: [{ name: 'main', components: [{ id: 'deals', type: 'record:related_list', properties: { objectName: 'deal', relationshipField: 'account' } }] }], + }); + return ( + ) => setDraft((d) => ({ ...d, ...patch }))} + onClearSelection={() => {}} + readOnly={false} + locale={'en-US'} + /> + ); + } + render(); + const block = await screen.findByTestId('block-filter-rules'); + await waitFor(() => expect(within(block).getByRole('button', { name: 'Add filter' })).toBeInTheDocument()); + expect(await offeredFor(block, 'Regions')).toEqual(labelsFor('select', true)); + }); +}); + +/* The Studio list-view inspector, over a REAL `MetadataClient` whose transport + * serves the object and its default list view as the platform does + * (`ObjectListViewInspector.hiddenSystemFields-13152.test.tsx`'s harness). */ + +const VIEW = 'deal.default'; +const json = (status: number, body: unknown) => + new Response(JSON.stringify(body), { status, headers: { 'Content-Type': 'application/json' } }); +const GRID_VIEW = { + name: VIEW, + object: 'deal', + viewKind: 'list', + isDefault: true, + config: { type: 'grid', data: { provider: 'object', object: 'deal' }, columns: ['name'] }, +}; + +async function serve(input: RequestInfo | URL, init?: RequestInit): Promise { + const method = (init?.method ?? 'GET').toUpperCase(); + const url = new URL(String(input), 'http://studio.test'); + const meta = url.pathname.match(/^\/api\/v1\/meta\/(.+)$/); + if (!meta) return json(404, { error: { code: 'NOT_FOUND', message: 'absent' } }); + const seg = meta[1].split('/').map(decodeURIComponent); + if (seg[0] === '_drafts') return json(200, { drafts: [] }); + if (method === 'PUT') return json(200, { success: true, version: 'v2', state: 'draft' }); + if (seg[0] === 'object' && seg.length === 2) return json(200, { type: 'object', name: seg[1], item: DEAL }); + const isView = seg[0] === 'view' && seg[1] === VIEW; + if (seg.length === 3 && seg[2] === 'layers') { + return isView + ? json(200, { code: null, overlay: GRID_VIEW, overlayScope: 'env', effective: GRID_VIEW }) + : json(404, { error: { code: 'NOT_FOUND', message: 'absent' } }); + } + if (seg.length === 2 && url.searchParams.get('state') === 'draft') { + return json(404, { error: { code: 'NO_DRAFT', message: 'absent' } }); + } + return isView ? json(200, { type: 'view', name: VIEW, item: GRID_VIEW }) : json(404, { error: { code: 'NOT_FOUND', message: 'absent' } }); +} + +const METADATA: MetadataContextValue = { + apps: [], + objects: [DEAL], + dashboards: [], + reports: [], + pages: [], + loading: false, + error: null, + refresh: async () => {}, + invalidate: () => {}, + ensureType: async () => [], + getItem: async () => null, + getItemsByType: () => [], +}; + +describe('the Studio list-view inspector’s filter carries `multiple` (objectstack#36169)', () => { + it('offers a multiple: true column membership only, and keeps Equals on a single-value control', async () => { + const real = new MetadataClient({ baseUrl: '', fetch: vi.fn(serve) as unknown as typeof fetch }); + clients.current = real; + const LEAF: Surface = { type: 'object', name: 'deal', label: 'Deals' }; + function Host() { + const listView = useObjectListViewDraft({ client: real, packageId: 'com.acme.app', leaf: LEAF, publishNonce: 0 }); + return ; + } + render( + + + , + ); + const filter = await screen.findByTestId('list-view-filter', {}, { timeout: 5000 }); + await waitFor(() => expect(within(filter).getByRole('button', { name: 'Add filter' })).toBeInTheDocument()); + expect(await offeredFor(filter, 'Accounts')).toEqual(labelsFor('lookup', true)); + await pickFrom(filter, 0, 'Owner'); + expect(await optionsOf(filter, 1)).toContain('Equals'); + }); +}); diff --git a/ui/packages/app-shell/src/views/metadata-admin/widgets.tsx b/ui/packages/app-shell/src/views/metadata-admin/widgets.tsx index 5754160da58..1371ba68905 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/widgets.tsx +++ b/ui/packages/app-shell/src/views/metadata-admin/widgets.tsx @@ -93,6 +93,14 @@ export interface ObjectFieldOption { * column carries them (objectstack#27515). Absent when none are declared. */ options?: Array<{ value: string; label: string }>; + /** + * The field's declared `multiple: true` — a `select` / `lookup` / `user` + * whose stored value is a list. Read by the `filter-builder` widget alone: + * with the type it decides which operators the runtime `FilterBuilder` + * offers the column (`operatorsForField`), membership and the empty checks + * on a list. Absent otherwise. + */ + multiple?: boolean; } /** One entry of the source object's view catalog (`view-ref`). */ @@ -2874,7 +2882,7 @@ function groupOfStoredRules(shown: { logic: 'and' | 'or'; rules: unknown[] } | n export function FilterBuilderField({ value, onChange, fields, readOnly, id, ariaLabelledBy, loadError }: { value?: FilterElementLite[]; onChange: (rules: FilterElementLite[]) => void; - fields: Array<{ name: string; label?: string; type?: string; options?: Array<{ value: string; label: string }> }>; + fields: Array<{ name: string; label?: string; type?: string; options?: Array<{ value: string; label: string }>; multiple?: boolean }>; readOnly?: boolean; /** * Why `fields` is empty, when the reason is that the catalog failed to load @@ -2933,12 +2941,16 @@ export function FilterBuilderField({ value, onChange, fields, readOnly, id, aria // picklist column's value as a picker over them and stores the option's // `value` — the runtime list filter's control, not a second editor. Without // them a picklist column got a free-text box, and the label an author typed - // there matched no record. + // there matched no record. `multiple` travels too: with the type it decides + // the operators the builder offers (`operatorsForField`), so a list-valued + // column is offered membership and the empty checks, never `equals` / `in`, + // which the data door refuses on a list. const fbFields = fields.map((f) => ({ value: f.name, label: f.label || f.name, type: f.type, ...(f.options ? { options: f.options } : {}), + ...(f.multiple === true ? { multiple: true } : {}), })); const storedRules = rulesOfStoredElements(rules); const summary = storedRules.length diff --git a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx index 8bd4a902c89..6dd6b443a22 100644 --- a/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx +++ b/ui/packages/app-shell/src/views/studio-design/ObjectListViewInspector.tsx @@ -1363,8 +1363,16 @@ export function ObjectListViewInspector({ ? { status: 'loading' } : loaded( // `options` ride along for the filter's picklist value picker - // (objectstack#27515); the other pickers read name, label and type. - fields.map((f) => ({ name: f.name, label: f.label, type: f.type, ...(f.options ? { options: f.options } : {}) })), + // (objectstack#27515), `multiple` for its operator set (a list-valued + // column takes membership and the empty checks only); the other + // pickers read name, label and type. + fields.map((f) => ({ + name: f.name, + label: f.label, + type: f.type, + ...(f.options ? { options: f.options } : {}), + ...(f.multiple ? { multiple: true } : {}), + })), ); const labelOf = (name: string) => fields.find((f) => f.name === name)?.label ?? name; const sort = sortEntriesOf(body.sort);