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

Add ui:DuplicateKeySuffixSeparator #2467

Closed
wants to merge 1 commit into from

Conversation

nickgros
Copy link
Contributor

Reasons for making this change

For my own use case, I needed to change the separator from - to _ between a duplicate key and its unique suffix when using additionalProperties.

To accomplish this, I added a new field to the uiSchema called ui:DuplicateKeySuffixSeparator, which can be used to override the separator with any string.

If the property is undefined, - is used, so the default behavior is unchanged.

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

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.

Does this need to be in the uiSchema (i.e. being controlled by a per-field basis) or do you think this would also work if you just made it a form prop (so being controlled on an entire-form basis)?

@nickgros
Copy link
Contributor Author

Hey @epicfaace, thanks for the quick response.

This could definitely be a prop on the form component. Should that be in addition to, or instead of exposing it via uiSchema?

@nickgros
Copy link
Contributor Author

Obsoleted by #3048

@nickgros nickgros closed this Aug 26, 2022
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.

2 participants