Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default function RadioGroup({
onPress,
radioButtons,
selectedId,
testID
testID,
disabled = false
}: RadioGroupProps) {

function handlePress(id: string) {
Expand Down Expand Up @@ -41,6 +42,7 @@ export default function RadioGroup({
labelStyle={button.labelStyle || labelStyle}
selected={button.id === selectedId}
onPress={handlePress}
disabled={disabled}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applying this will override any 'disabled' attributes on individual radio buttons, thereby eliminating the ability to disable specific buttons.

/>
))}
</View>
Expand Down
1 change: 1 addition & 0 deletions lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ export type RadioGroupProps = {
radioButtons: RadioButtonProps[];
selectedId?: string;
testID?: string;
disabled?: boolean;
};