ui-select

Angular ui-select tagging lose text input on blur

梦想的初衷 提交于 2019-12-05 08:23:06
THE SITUATION Hello guys! I am using Angular ui-select for my app in order to select users from a database. Using Tagging is possible to enter a new entry in the event the user is not present in the list. By writing the name and pressing ENTER or TAB the new entry is saved as a new tag. Everything is working fine except one little thing: if i focus out with the mouse i lose the input i have entered, and this is not quite user-friendly. CODE <h3>Array of objects</h3> <ui-select multiple tagging tagging-label="new tag" ng-model="multipleDemo.selectedPeople" theme="select2" ng-disabled="disabled"

How to make the ui-select more bootstrap?

折月煮酒 提交于 2019-12-04 21:44:09
I'm using ui-select select-boxes and regular bootstrap select-boxes side by side, and I want them to look exactly the same. More precisely, I want the ui-select boxes to look like the bootstrap ones. I noticed a few differences: The shape of the arrow. The ui-select box turns grey when being hovered. The bootstrap box doesn't. There's a lot of spacing between options inside the ui-select box and there is a margin on the side. There should only be margin when the grouping feature is activated (and even then the names of the groups should have no margin). The ui-select box is focused when

Angular ui-select: How to bind only selected value to ng-model

家住魔仙堡 提交于 2019-12-04 02:54:50
$scope.property = new Property(); $scope.property.propertyType = {}; $scope.propertyTypes = [ { value: 'ResidentialPlot', name: 'Residential Plot' }, { value: 'CommercialPlot', name: 'Commercial Plot' }, { value: 'Apartment', name: 'Apartment/Flat' }, { value: 'Townhouse', name: 'Townhouse' }, { value: 'House', name: 'Single Family House' }, { value: 'Commercial', name: 'Commercial Property' } ]; <label for="ptype" class="col-sm-2 control-label">Property Type</label> <p>Populated: {{property.propertyType}}</p> <ui-select ng-model="property.propertyType" id="ptype" theme="selectize" ng-disabled

ui-select multiselect is very slow in displaying the choices

你。 提交于 2019-12-02 18:15:31
I ran into this problem, and I don't know how to solve it. I have used a ui-select multiselect in my page. First, a http.get request is made to a url which gets the data, then the ui-select choices are populated. The data is big - the length of the data is 2100. This data is to be shown as choices. (The data is fetched at the beginning during the loading of the page and is stored in an array) But the problem is each time I click on the multiselect to select a choice, it takes 4-5 seconds to populate the list and the page becomes very slow. What do I do to reduce this time? The choices data is

ui select angularjs set maxlength for input value (ui select match)

混江龙づ霸主 提交于 2019-12-02 10:04:54
问题 I want an extra attribute just like "Placeholder" is passing from ui select match. I want to set maxlength of select input. I can set it through select.min.js adding attribute maxlength="" but i think making change to lib. file is not a solution. Just like i have adde maxlength="500" in input please help me around. Thanks 回答1: You can limit your collection using the angular's limitTo filter. Look at the limitTo reference. 回答2: As per my understanding, you are using ui-select with tagging (as

ui select angularjs set maxlength for input value (ui select match)

喜你入骨 提交于 2019-12-02 05:43:33
I want an extra attribute just like "Placeholder" is passing from ui select match. I want to set maxlength of select input. I can set it through select.min.js adding attribute maxlength="" but i think making change to lib. file is not a solution. Just like i have adde maxlength="500" in input please help me around. Thanks You can limit your collection using the angular's limitTo filter. Look at the limitTo reference. As per my understanding, you are using ui-select with tagging (as combo-box). in this to achieve your desired functionality: go to ui-select plugin.js and edit the template

Angular ui-select placeholder not working when ng-model is initialized

两盒软妹~` 提交于 2019-12-01 08:15:24
I am trying to add a new select every time a button is clicked, The html: <div ng-repeat = "select in selects track by $index"> <ui-select ng-model="selects[$index]" theme="select2" ng-disabled="disabled" style="min-width: 300px;"> <ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="person in people"> <div ng-bind-html="person.name | highlight: $select.search"></div> </ui-select-choices> </ui-select> </div> <button ng-click="addNewSelect()"> Add new select</button> The controller: $scope

Angular ui-select placeholder not working when ng-model is initialized

自作多情 提交于 2019-12-01 07:10:22
问题 I am trying to add a new select every time a button is clicked, The html: <div ng-repeat = "select in selects track by $index"> <ui-select ng-model="selects[$index]" theme="select2" ng-disabled="disabled" style="min-width: 300px;"> <ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="person in people"> <div ng-bind-html="person.name | highlight: $select.search"></div> </ui-select-choices> <

Conditionally add the “multiple” attribute to ui-select

风流意气都作罢 提交于 2019-12-01 01:11:40
问题 I'm trying to add the multiple attribute to a ui-select directive based on the value of a certain property using the ng-attr- directive. Unfortunately, that's not working for me. I've setup a plunker example to showcase what is happening. Plunker Example 回答1: Edit I finally got it after reading through the mentioned GitHub Issue in the Angular Repo. You need to set up a directive with a higher priority and a terminal attribute set to true (which skips the compilation of all other directives,

How to make an autocomplete just like google auto suggest in angular ui-select

Deadly 提交于 2019-11-30 15:37:29
I am using angular ui-select for autocomplete. When the user start typing, I want to show the best matching item as watermarked, and when the user press tab, it should be selected (same like google auto suggest) Please see the image also. you can see that, when I type 'auto' 'complete' is shown as watermark and if I pres TAB, it will be selected. there are a bower plugin autocompletelikegoogle and you can create an angular directive to render an autocomplete input in your application. Directive.js angular.module('app').directive('autoComplete', [ '$timeout', function($timeout) { return