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

Injecting custom options in dropdown #303

Open
aconrad opened this issue Nov 18, 2022 · 5 comments
Open

Injecting custom options in dropdown #303

aconrad opened this issue Nov 18, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@aconrad
Copy link

aconrad commented Nov 18, 2022

Thanks for this great tool!

Sometimes the user will enter an address that doesn't exist in Google Maps and it will either return no results or results that aren't relevant. We'd still want the user to be able to enter their address in plain text, for example if it's a PO Box which Google Maps doesn't support. We could offer their text in the dropdown suggestion for them to select.

What do you think? Are there any ways to achieve that today? And suggestions if we were to support this feature?

@Tintef
Copy link
Owner

Tintef commented Nov 19, 2022

That should actually be pretty easy to implement as react-select has an AsyncCreatableSelect select component.

As of now, it's not supported to use a select component that isn't AsyncSelect, but it should be enough to add a creatable prop to this component and use either AsyncSelect or AsyncCreatableSelect depending on it 🤔

Sadly, I don't have enough time to do this changes probably until we are on mid December or so, but I'll gladly review a PR 😄

@aconrad
Copy link
Author

aconrad commented Nov 19, 2022

Thanks! I don't know if I'll have time for a PR but if I do I'll submit something.

@uffou
Copy link

uffou commented Dec 12, 2022

Just made a PR for this #312

@Tintef
Copy link
Owner

Tintef commented Apr 16, 2023

@uffou I made some changes to the repo and your code is old now -- I also think it missed some stuff around docs/types, that's why I didn't merge before my refactor --.

Can you update?

@SpajicM
Copy link

SpajicM commented Feb 5, 2024

@uffou @Tintef I've came across this today in my project. What is needed for this feature to be merged?

@Tintef Tintef added the enhancement New feature or request label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants