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] make it possible to 'create new options' when the user did not find items (extra option like the 'no Entries found' option) #345

Open
pieterdegraeuwe opened this issue Nov 12, 2021 · 3 comments

Comments

@pieterdegraeuwe
Copy link

pieterdegraeuwe commented Nov 12, 2021

Is your feature request related to a problem? Please describe.

At this point, when the user is typing/searching, at a moment it might occur that no options are available.
The message can be configured with the [noEntriesFoundLabel]. Works as expected.
However sometimes it should be possible to create the 'not found item'. the [noEntriesFoundLabel] could then be 'No items found, press Enter to create one.'
This could emit an event with the search criteria or something like that

Describe the solution you'd like
I think the easiest solution would be to add an eventemitter which emits when the user presses Enter when the [noEntriesFoundLabel] was shown

Describe alternatives you've considered
adding an extra button next to the options, but this is not really userfriendly... just hitting Enter is much more convenient

Note that I don't expect a full handling of the creation of options. This is case buy case very specific.
However, it should be possible to trigger the start of that creation, for example by using an event.

@macjohnny
Copy link
Member

How about checking whether the length of the options is zero? And then just show a separate option activated via ngIf?

@macjohnny
Copy link
Member

Sorry, somehow I missed the part about pressing the enter key.

if you want to contribute such an event emitter, please file a PR

@macjohnny
Copy link
Member

@pieterdegraeuwe any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants