Skip to content

Commit

Permalink
fix(Radio, Checkbox): export required prop type (ant-design#46028)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnmax authored Nov 23, 2023
1 parent 9f9f64e commit bb5dd4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface AbstractCheckboxProps<T> {
autoFocus?: boolean;
type?: string;
skipGroup?: boolean;
required?: boolean;
}

export interface CheckboxChangeEventTarget extends CheckboxProps {
Expand Down
2 changes: 2 additions & 0 deletions components/checkbox/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface CheckboxOptionType {
title?: string;
id?: string;
onChange?: (e: CheckboxChangeEvent) => void;
required?: boolean;
}

export interface AbstractCheckboxGroupProps {
Expand Down Expand Up @@ -126,6 +127,7 @@ const InternalGroup: React.ForwardRefRenderFunction<HTMLDivElement, CheckboxGrou
style={option.style}
title={option.title}
id={option.id}
required={option.required}
>
{option.label}
</Checkbox>
Expand Down
1 change: 1 addition & 0 deletions components/radio/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>((props, ref
title={option.title}
style={option.style}
id={option.id}
required={option.required}
>
{option.label}
</Radio>
Expand Down

0 comments on commit bb5dd4d

Please sign in to comment.