fix: relation picker page size refused by entry list
This commit is contained in:
1 parent
f2cdbcd3cb
commit
daba3c04c0
4 files changed
+24
-2
No files matched your search
@@ -14,7 +14,13 @@ import { ruleMessage } from '@/lib/entryMessages'
|
||||
import { groupFields } from '@/lib/entryLayout'
|
||||
import { classifyRefusal, parseEntryRefusal } from '@/lib/entryServerError'
|
||||
import { FIELD_TYPES, fieldTypeSpec } from '@/lib/fieldTypes'
|
||||
import { isRelationId, relationIdsOf, summariesOf, type RelationSummary } from '@/lib/relationField'
|
||||
import {
|
||||
RELATION_PAGE_SIZE,
|
||||
isRelationId,
|
||||
relationIdsOf,
|
||||
summariesOf,
|
||||
type RelationSummary,
|
||||
} from '@/lib/relationField'
|
||||
import { relationRowOf } from '@/lib/relationRows'
|
||||
import { ApiError } from '@/lib/apiError'
|
||||
import { diffFields } from '@/lib/schemaBuilderDiff'
|
||||
@@ -481,3 +487,9 @@ describe('relation in the builder model', () => {
|
||||
expect(data.speakers).toEqual([])
|
||||
})
|
||||
})
|
||||
|
||||
describe('the picker page size', () => {
|
||||
it('is one of the sizes the entry list endpoint accepts', () => {
|
||||
expect([5, 25, 50, 100]).toContain(RELATION_PAGE_SIZE)
|
||||
})
|
||||
})
|
||||
@@ -7,7 +7,7 @@ export type RelationKind = (typeof RELATION_KINDS)[number]
|
||||
|
||||
export const DEFAULT_RELATION_KIND: RelationKind = 'one_to_many'
|
||||
export const RELATION_MAX = 50
|
||||
export const RELATION_PAGE_SIZE = 10
|
||||
export const RELATION_PAGE_SIZE = 25
|
||||
|
||||
const RELATION_ID_MAX = 4294967295
|
||||
|
||||
|
||||
Reference in new issue
Block a user