feat: isRequired for fields now respected

This commit is contained in:
Vasily Zubarev
2025-05-09 16:43:03 +02:00
parent 92dd66fd00
commit f42fdcf74e
11 changed files with 114 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ export const FormSelectCategory = ({
emptyValue,
placeholder,
hideIfEmpty = false,
isRequired = false,
...props
}: {
title: string
@@ -18,6 +19,7 @@ export const FormSelectCategory = ({
emptyValue?: string
placeholder?: string
hideIfEmpty?: boolean
isRequired?: boolean
} & SelectProps) => {
const items = useMemo(
() => categories.map((category) => ({ code: category.code, name: category.name, color: category.color })),
@@ -30,6 +32,7 @@ export const FormSelectCategory = ({
emptyValue={emptyValue}
placeholder={placeholder}
hideIfEmpty={hideIfEmpty}
isRequired={isRequired}
{...props}
/>
)