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

feat: Add customItemValueDelimiter #670

Open
wants to merge 2 commits into
base: dev-5.x
Choose a base branch
from

Conversation

JHeigle
Copy link

@JHeigle JHeigle commented May 15, 2023

Hey @hossein-zare, saw a potential small issue with the custom item value .replace() modifier for spaces. This update will allow users to customize the delimiter for the value saved when selecting a custom item and make sure that the delimiter is implemented in all space instances.

  • The value for the customItemValueDelimiter defaults to what was already in place (-).
  • .replace() was replaced (no pun intended) with .replaceAll().

Thank you for your feedback!

@jacklj
Copy link

jacklj commented Jul 10, 2023

This is great, thanks, could it be merged please?

@joshzeldin
Copy link

This is great and helps solve the issue I was having #604

I was looking into this same thing and was struggling to figure out why the space to dash replacement was necessary at all. Do you know what the purpose of the replacement is? For my use, I'd like to maintain the spaces in my items, but I'm not sure if this is going to break the library?

@@ -163,6 +163,7 @@ function Picker({
closeOnBackPressed = false,
extendableBadgeContainer = false,
onSelectItem = (item) => {}
Copy link

Choose a reason for hiding this comment

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

I think you're missing a comma here
onSelectItem = (item) => {},

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.

None yet

3 participants