Giter Site home page Giter Site logo

Comments (6)

ghiden avatar ghiden commented on June 6, 2024

Do you want to clear out the input field after a selection is made?
If so, use clear-selected.

from angucomplete-alt.

dnlmelo avatar dnlmelo commented on June 6, 2024

I'm doing it:

$scope.selectedObject = function(data) {
if (data) {
var contact = data.title + ' <'+ data.description+'>, '
$timeout(function() {
angular.element('#contacts_value').val(contact)
}, 50);
};
}
The input be a isolate scope, I not get the model searchStr from parent and
change the value for selection to this above. Notice the '<' '>' to change
de value from selected

2014-07-14 15:06 GMT-03:00 Hidenari Nozaki [email protected]:

Do you want to clear out the input field after a selection is made?
If so, use clear-selected.


Reply to this email directly or view it on GitHub
#16 (comment)
.

from angucomplete-alt.

ghiden avatar ghiden commented on June 6, 2024

I'm sorry, I don't understand what you are trying to do here.

  1. User types in some characters.
  2. Suggestions show up.
  3. User selects a suggestion.
  4. Input field gets cleared?
  5. And what else?

from angucomplete-alt.

dnlmelo avatar dnlmelo commented on June 6, 2024

The input's model is searchStr, so, before put suggestion in input tag, I
want change this.

  1. User types in some characters. ok
  2. Suggestions show up. ok
  3. User selects a suggestion. ok {name: 'User', description: 'Something'
  4. Input field gets cleared? Maybe.
  5. And what else? Put in input tag: "User (Something)" Notice the "()"

Thanks

2014-07-14 17:16 GMT-03:00 Hidenari Nozaki [email protected]:

I'm sorry, I don't understand what you are trying to do here.

  1. User types in some characters.
  2. Suggestions show up.
  3. User selects a suggestion.
  4. Input field gets cleared?
  5. And what else?


Reply to this email directly or view it on GitHub
#16 (comment)
.

from angucomplete-alt.

ghiden avatar ghiden commented on June 6, 2024

I don't think it's possible.

from angucomplete-alt.

ghiden avatar ghiden commented on June 6, 2024

I don't think it is a good user experience.
User sees a list of names in the suggestion, but once he makes a selection, what he sees is the selection with extra information.
What you can do is to prepare data attribute called nameAndDescription which has something like 'User (description)' so that he sees this string in the suggestion then when he selects it, it is inserted into input field.

from angucomplete-alt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.