8000 Added Ability to display label instead of value by tareko · Pull Request #80 · aehlke/tag-it · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added Ability to display label instead of va 8000 lue #80

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tareko
Copy link
@tareko tareko commented May 14, 2012

Not all use cases involve the Value and Label being the same. This functionality makes it so that 'label' will be displayed, while 'value' will be submitted to the form.

Some if/then statements mean that if no Label is found, the Value is used - as before.

@tareko
Copy link
Author
tareko commented May 17, 2012

A bug that I discovered is that the ID and not the label will be displayed if a person keys over to the appropriate entry.

@aklein-dex
Copy link

Excellent feature !!

@jjlharrison
Copy link

Doesn't appear to work when using the down key to select an autocomplete option. that.createTag(that._cleanedInput()); is called without the jquery ui item.

@n3ISe
Copy link
n3ISe commented Sep 20, 2012

It's ok when I use mouse to select the autocomplete option. But if I use the down key it will display ID instead of label.
How to solve this issue??

@jjlharrison
Copy link

@n3ISe I've fixed that issue in my fork: https://github.com/jjlharrison/tag-it

@n3ISe
Copy link
n3ISe commented Sep 20, 2012

Thanks @jjlharrison

@jlebrech
Copy link

+1

You could create a branch with this and refactor later.

@alaa9jo
Copy link
alaa9jo commented May 7, 2013

@n3ISe To fix the issue with key down you have to implement a function for autocomplete 'focus' property,like this:

$("#myInput").tagit({
autocomplete: {
focus: function (event, ui) {
                        $(this).val(ui.item.label);
                        return false;
                    }
    }
});

Also,When tareko's changes are going to be merged into the master repository ?

@jpetitcolas
Copy link

+1. Would be really nice to add this feature.

If not ready for merge, what is missing? We may perhaps help? :)

@KerryJones
Copy link

Any update on this?

@fadedthrough
Copy link

I was able to fix this issue by editing my jquery-ui.js 8000 file.

I am using jQuery UI version 1.10.4, it was on line 2267. I needed to change:

if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
     this._value( item.value );
}

to

if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
     this._value( item.label );
}

@mhuggins
Copy link

+1, started integrating this plugin but realized I can't use it in its current state.

@mubashirkamran
Copy link

+1

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

Successfully merging this pull request may close these issues.

0