Skip to content
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

ref(select): Choices -> options RuleNode #28712

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

davidenwang
Copy link
Contributor

Changes from choices to options here:
image

@davidenwang davidenwang requested a review from a team September 21, 2021 00:51
@@ -81,7 +81,7 @@ class RuleNode extends React.Component<Props> {
//
// However there are integrations that give the form field choices with the value as number, but
// when the integration configuration gets saved, it gets saved and returned as a string
const choices = fieldConfig.choices.map(([key, value]) => [`${key}`, value]);
const options = fieldConfig.choices.map(([value, label]) => ({value, label}));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed the names here cuz it was a little misleading, value is the first index of the array and the label is the second

@davidenwang davidenwang merged commit 680bd1d into master Sep 21, 2021
@davidenwang davidenwang deleted the davidenwang/rule-node-choices-to-options branch September 21, 2021 18:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants