Skip to content

Commit

Permalink
fix: load categoryOptionSize initially
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Dec 5, 2024
1 parent bbb4d54 commit e8f35c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/categoryCombos/Edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const fieldFilters = [
...DEFAULT_FIELD_FILTERS,
'name',
'code',
'categories[id,displayName]',
'categories[id,displayName,categoryOptions~size~rename(categoryOptionsSize)],',
'skipTotal',
'dataDimensionType',
] as const
Expand Down
1 change: 1 addition & 0 deletions src/pages/categoryCombos/form/categoryComboSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const categoryComboSchema = identifiable
categoryOptionsSize: z.number(),
})
)
.min(1, i18n.t('At least one category is required'))
.refine(
(categories) => {
const generatedCocsCount = categories.reduce(
Expand Down

0 comments on commit e8f35c1

Please sign in to comment.