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

Feature Request | Ability to show a No Data message #34

Open
themitigater opened this issue Jul 27, 2023 · 3 comments
Open

Feature Request | Ability to show a No Data message #34

themitigater opened this issue Jul 27, 2023 · 3 comments

Comments

@themitigater
Copy link

Hi,
Thank you for building this.

Is there a possibility to add a No Data message when the returned options is %{} or []? I'm happy to contribute if you can guide me to add this.

@maxmarcon
Copy link
Owner

Hi @themitigater. You can easily show a "No Data" message anywhere in the view if there are no options available. So I'm guessing that you are asking for an unselectable "No Data" entry that will appear in the dropdown?

@themitigater
Copy link
Author

Hi @maxmarcon , that's correct.

@maxmarcon
Copy link
Owner

maxmarcon commented Jul 29, 2023

Ok! Then my suggestion would be to add a slot for this. There is already an :option slot that you can use to render an entry in the dropdown. Similarly, we could have a :no_option (not sure about the best name here) slot that one can use to render a nonselectable placeholder when there aren't any options to select from.

If you want to go ahead and produce a PR for this, that would be great!

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

No branches or pull requests

2 participants