Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

keep the value entered into a ui-select if the value does not match #162

Closed
jongravois opened this issue Aug 19, 2014 · 6 comments
Closed
Milestone

Comments

@jongravois
Copy link

Is there a way to keep the value entered into a ui-select if the value does not match the json feed? I would like to use this to allow a user to create a new applicant but if the applicant already exists, I would like the user to be able to choose the match.

As it is by default, if there is no match, the value is deleted.

@dimirc
Copy link
Contributor

dimirc commented Aug 20, 2014

I don't see that the value on the search is deleted if there isnt a match, can you create a plunker or elaborate this issue?

@jongravois
Copy link
Author

Here is my use case:

I am building an loan application where the officer begins by typing in the customer’s name (hopefully, into ui-search). If the customer is a returning customer, the name will match, the officer can click the name and populate the form. If there’s NO match, this is a new customer so the form has to filled out. The client thinks it is “19th century” for the officer to have to retype the name into a different field to start the “new” application. If the value wasn’t deleted when the match object count reaches 0, this would solve that.

To see the issue, just use the plunker provided as a demo. In any of the fields begin typing. When there are no more matches, hit the tab key to blur the form field and you will see that the value is deleted.

Jon

On Aug 20, 2014, at 4:11 PM, Wladimir Coka [email protected] wrote:

I don't see that the value on the search is deleted if there isnt a match, can you create a plunker or elaborate this issue?


Reply to this email directly or view it on GitHub.

@jongravois
Copy link
Author

By the way, in my response a few seconds ago, I failed to state how appreciative I am of your efforts and of your product. UI-SELECT is beneficial for AngularJS and I for one am appreciative.

Jon

On Aug 20, 2014, at 4:11 PM, Wladimir Coka [email protected] wrote:

I don't see that the value on the search is deleted if there isnt a match, can you create a plunker or elaborate this issue?


Reply to this email directly or view it on GitHub.

@dimirc
Copy link
Contributor

dimirc commented Aug 20, 2014

@jongravois I think could be solve if we implement the option to create items on-the-fly, that way if what the user is typing isn't a match of the choices, then it will still be valid.

I saw some PR proposed (#63 and #38), honestly I haven't be able to check them yet. But will be next in line after multi selection support from #138

@jongravois
Copy link
Author

that’s awesome!

On Aug 20, 2014, at 4:11 PM, Wladimir Coka [email protected] wrote:

I don't see that the value on the search is deleted if there isnt a match, can you create a plunker or elaborate this issue?


Reply to this email directly or view it on GitHub.

@dimirc dimirc added this to the 0.9.x milestone Sep 9, 2014
@dimirc dimirc modified the milestones: 0.10.x, 0.9.x Oct 6, 2014
@dimirc
Copy link
Contributor

dimirc commented Oct 10, 2014

Related to #260

@dimirc dimirc closed this as completed Mar 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants