feat: pagination + hide fields in settings

This commit is contained in:
Vasily Zubarev
2025-03-27 08:48:47 +01:00
parent a80684c3fb
commit 61da617f68
25 changed files with 813 additions and 220 deletions

View File

@@ -10,11 +10,27 @@ export const FormSelectCategory = ({
categories,
emptyValue,
placeholder,
hideIfEmpty = false,
...props
}: { title: string; categories: Category[]; emptyValue?: string; placeholder?: string } & SelectProps) => {
}: {
title: string
categories: Category[]
emptyValue?: string
placeholder?: string
hideIfEmpty?: boolean
} & SelectProps) => {
const items = useMemo(
() => categories.map((category) => ({ code: category.code, name: category.name, color: category.color })),
[categories]
)
return <FormSelect title={title} items={items} emptyValue={emptyValue} placeholder={placeholder} {...props} />
return (
<FormSelect
title={title}
items={items}
emptyValue={emptyValue}
placeholder={placeholder}
hideIfEmpty={hideIfEmpty}
{...props}
/>
)
}