-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
To prevent the hash to reload the page
Conflicts: dist/select.css dist/select.css.min.css dist/select.js dist/select.js.min.js
Conflicts: dist/select.css dist/select.css.min.css dist/select.js dist/select.js.min.js
Conflicts: dist/select.css dist/select.css.min.css dist/select.js dist/select.min.js src/select.js
Conflicts: dist/select.css dist/select.css.min.css dist/select.js dist/select.min.js src/select.js
Conflicts: dist/select.js src/select.js
…ot yet selected results list elements
@dimirc is there a problem with the Gulp build? When I make changes to |
Apologies, I'm good now - it was failing jshint and I didn't notice. All good now, think the next build should pass. |
…ng with labels in drop down and tagging without labels
@dimirc, would love some review on this. The addition of a Usage
|
…aving ambiguous `ctrl.activeIndex`
Whitespace free diff here: https://github.com/angular-ui/ui-select/pull/327/files?w=1 |
This is awesome! Been waiting for this for a while (see #226). Thanks for all your hard work getting this done so we can finally migrate from ui-select2. |
Can you give me a demo and a short doc on how to use this? |
@amcdnl demo is already in there: https://github.com/angular-ui/ui-select/blob/master/examples/demo-tagging.html. As for docs, I just updated the wiki: https://github.com/angular-ui/ui-select/wiki/ui-select |
@brianfeister I'm not really am active maintainer so I'm extending an invite to you. I think @dimirc wants to follow the convention of generating the dist files in their own respective commit that would then be tagged vs regenerating them with every patch. You probably should not have touched the dist files in any way. I have no opinion on best practice but perhaps you can regenerate them on a new tagged commit |
Great thanks for the access, appreciate the vote of confidence. I pushed out a release tag and an associated commit: https://github.com/angular-ui/ui-select/releases/tag/v0.8.4 |
@ProLoser @brianfeister ya he requested me to remove dist files so those can be generated on release to avoid merge collisions. |
@amcdnl @brianfeister I don't think you're supposed to delete and add dist files all the time. Just leave them untouched in patches and only modify them in their own dedicated release commits. |
@brianfeister to keep it consistent, I created release v0.9.0 |
@maxcook - what would make you think that this comment
would further the cause of making the world a better place? The answer to your question is that you're asking the wrong question. I didn't write the line of code that you're referencing (also you did not correctly use Github markdown and you didn't give a line number reference, so you should probably do that). The code came from an upstream merge of another developers feature and it merged fluidly via Git so I never had the chance to look at that particular state of the directive. So, let's work together and fix it now. Please post a Plnkr.co / jsfiddle.net demo that reproduces the error and we'll get it fixed. Also you should probably open this as an issue rather than piggybacking on a closed merge request. Your other questions:
|
I would like to thank @brianfeister for the great work on this PR. It works like a charm! |
@brianfeister - big thanks for your work, really needed this. @maxcook - I think you can auto clear the text using resetSearchInput attribute on the ui-select element(reset-search-input="true"). You can also set it globally using config:
|
Thanks for the support everyone, appreciate that. @ceesvanegmond - can you try this for me and see if it fixes the issue: If not, please give me a demo of the bug. |
@ceesvanegmond @brianfeister This is due to line 626: Cannot read _uiSelectChoiceDisabled of null makes sense.
note: fixing this also got reset-search-input working correctly again, which was not resetting due to the exception. |
Feature Request:
Also the user may copy-paste a string (e.g. a list of emails separated by semicolons) into the ui-select and the tagging function may decide there are more than one item in the input. So I guess its a good idea to have the tagging function return an array (zero or more items) instead of a string. |
@darrudi - please open a separate issue for this so that your request doesn't get lost. |
@brianfeister - done: #485 |
thank you @brianfeister. I just run the example, exactly what i wanted, so now i just need to learn how to use it. Thanks all for the hard work. |
Is there any way to disable new tag creation? I want users to only be able to pick tags available in the drop down menu. EDIT: Never mind. I just disabled |
;) |
@pruchai: Take a glance at examples. All this thread is/was about adding free tag support. :) |
Great feature to add tagging but I was really hoping this would work for just a regular select dropdown not just the "multiple" select. I have a single select and I'd like it if a user could add options to this list. I tried using tagging on a single select in the demo code and in my own code and it doesn't seem to work. Do you have plans to implement this for the regular select dropdowns? @brianfeister or does anybody else have a workaround to implement tagging for single select dropdowns? |
+1 |
@ceesvanegmond @brianfeister @parliament718 Updating the following line: |
@dimirc I've rebased the latest from @tvervest and @juanpasolano from #260. I've also added auto-tokenization support at your request, and custom labeling (with optional no-label) for new tags. Note that javascript ignores trailing / leading whitespace characters inside data attributes so users will need to use the constant / literal
SPACE
if they want tagging with that character. You can pass in pipes (so the only invalid character for tagging is|
) to get multiple tag characters. This can be seen in the tagging demo I've created in my fork here.Usage
tagging
- this attribute accepts an optional string which is a scope function. That function will be passed a string from the select input and return the transformed result will be injected intoctrl.items
(available for selection). e.g.<ui-select multiple tagging="tagTransform">
taggingTokens
- accepts a string that will be listened for inkeyup
, this keyboard character auto-tokenizes the current value and selects it. Multiple tokens are supported by separating characters with|
's. SPACE is a special case since whitespace characters are ignored in input fields by jQuery, as a result,tagging-tokens=" "
fails to eval to whitespace, so the special key valueSPACE
is used instead. e.g<ui-select multiple tagging tagging-tokens="SPACE|,|/">
would listen for space, comma, and forward slash.taggingLabel
- (false
|string
) accepts an optional string for the label appended to tags in the dropdown (defaults to(new)
if empty or undeclared. If the stringfalse
is declared it will omit the injected helper ({string} (new)
) value from the dropdown and tagging will trigger via tokenization shortcuts orENTER
key.