diff --git a/striker-ui/components/SelectWithLabel.tsx b/striker-ui/components/SelectWithLabel.tsx index 00ed6e02..8a7d63e2 100644 --- a/striker-ui/components/SelectWithLabel.tsx +++ b/striker-ui/components/SelectWithLabel.tsx @@ -24,6 +24,7 @@ const SelectWithLabel: FC = ({ messageBoxProps = {}, name, onChange, + required: isRequired, selectProps: { multiple: selectMultiple, sx: selectSx, @@ -80,11 +81,15 @@ const SelectWithLabel: FC = ({ const labelElement = useMemo( () => label && ( - + {label} ), - [inputLabelProps, label, selectId], + [inputLabelProps, isRequired, label, selectId], ); const menuItemElements = useMemo( () => diff --git a/striker-ui/types/SelectWithLabel.d.ts b/striker-ui/types/SelectWithLabel.d.ts index 384e48ff..d799a1b5 100644 --- a/striker-ui/types/SelectWithLabel.d.ts +++ b/striker-ui/types/SelectWithLabel.d.ts @@ -20,6 +20,7 @@ type SelectWithLabelOptionalProps = { >; label?: string; messageBoxProps?: Partial; + required?: boolean; selectProps?: Partial; };