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

Properly assign label prop for MultiSelect ArrayField #2459

Merged
merged 7 commits into from
Aug 11, 2021

Conversation

Parnswir
Copy link
Contributor

@Parnswir Parnswir commented Jul 2, 2021

Reasons for making this change

Fixes #2378

@epicfaace @fsteger do you think this would be an appropriate solution?

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@epicfaace
Copy link
Member

Why set it to "name" but not "title"?

@Parnswir
Copy link
Contributor Author

Parnswir commented Jul 5, 2021

@epicfaace title is not yet defined here. In other places, it is set to const title = schema.title || name;, so if you think that would be the better solution here, I would add this line as well.

@Parnswir Parnswir changed the title Assign name prop as widget label Assign name prop as widget label for MultiSelect ArrayField Jul 5, 2021
@Parnswir Parnswir requested a review from epicfaace July 8, 2021 13:28
Copy link
Member

@epicfaace epicfaace left a comment

Choose a reason for hiding this comment

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

Thanks! I took another look and it's helpful to know that other LOCs in the same ArrayField.js have similar logic as const title = schema.title || name; -- this makes it easier to understand how it works in context (and it's not adding anything new, rather just adding something that was missing earlier).

@epicfaace epicfaace changed the title Assign name prop as widget label for MultiSelect ArrayField Properly assign label prop for MultiSelect ArrayField Aug 11, 2021
@epicfaace epicfaace merged commit 1bbd0ad into rjsf-team:master Aug 11, 2021
@Parnswir Parnswir deleted the fix/arrayfield_label branch August 11, 2021 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label undefined for Multiselect ArrayField
3 participants