-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added choice radio button handling #1798
base: dev
Are you sure you want to change the base?
Conversation
Thanks @joelfmrodrigues for the update, I'll wait for the merge 😁 |
I just wrote the same feature and then I found this :-) |
@IRRDC I think we're still waiting for the other PR. |
@GuidoZam hi, sorry I have been struggling to find time and was a bit away from things for personal reasons. Hope to get moving again soon |
Hope everything's fine @joelfmrodrigues! |
@GuidoZam I tested your code and would suggest that you remove these two lines: |
Thanks for the feedback @IRRDC!! |
Hi Guido, would you mind updating your branch / PR regarding conflicts? Thanks. |
Hi @michaelmaillot, I've resolved the conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update!
I think you've missed the choiceType
variable init during the PR's sync with dev branch here:
// Store the choice type for Choice fields
// This represent the format of the choice field (Dropdown or Radio Buttons)
choiceType = field.FormatType;
A few things to update and we should be fine.
{labelEl} | ||
</div> | ||
<Dropdown | ||
let choiceControl: any = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let choiceControl: any = undefined; | |
let choiceControl: JSX.Element = undefined; |
<Icon className={styles.fieldIcon} iconName={customIcon ?? "CheckMark"} /> | ||
{labelEl} | ||
</div> | ||
{choiceControl} | ||
{descriptionEl} | ||
</div>; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} |
@@ -191,18 +191,46 @@ export class DynamicFieldBase extends React.Component<IDynamicFieldProps, IDynam | |||
} | |||
|
|||
case 'Choice': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case 'Choice': | |
case 'Choice': { |
What's in this Pull Request?
Added handling of the choice field when set to radio button instead of dropdown.