Skip to content

Commit 2641bf6

Browse files
karthicksundararajanBogaerts Kristof
authored and
Bogaerts Kristof
committed
fix(uiSelectSingle): Tagging without multiple with new tags doesn't works
Tagging in single select is not working which has been testing in latest version of angular. Here, I've just copied working version of code from uiSelectMultiple directive and removed some code which causes the problem. All the test has been passed. Examples are working fine Closes angular-ui#1409, angular-ui#890
1 parent 7aabdc4 commit 2641bf6

7 files changed

+367
-225
lines changed

dist/select.css

Lines changed: 8 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.19.5 - 2016-10-24T23:13:59.551Z
4+
* Version: 0.18.1 - 2016-07-20T20:40:49.941Z
55
* License: MIT
66
*/
77

@@ -82,16 +82,6 @@ body > .select2-container.open {
8282
border-bottom-color: #5897fb;
8383
}
8484

85-
.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden,
86-
.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden input{
87-
opacity: 0;
88-
height: 0;
89-
min-height: 0;
90-
padding: 0;
91-
margin: 0;
92-
border:0;
93-
}
94-
9585
/* Selectize theme */
9686

9787
/* Helper class to show styles when focus */
@@ -100,15 +90,10 @@ body > .select2-container.open {
10090
}
10191

10292
/* Fix input width for Selectize theme */
103-
.selectize-control.single > .selectize-input > input {
93+
.selectize-control > .selectize-input > input {
10494
width: 100%;
10595
}
10696

107-
/* Fix line break when there's at least one item selected with the Selectize theme */
108-
.selectize-control.multi > .selectize-input > input {
109-
margin: 0 !important;
110-
}
111-
11297
/* Fix dropdown width for Selectize theme */
11398
.selectize-control > .selectize-dropdown {
11499
width: 100%;
@@ -122,17 +107,8 @@ body > .select2-container.open {
122107
/* Handle up direction Selectize */
123108
.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown {
124109
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
125-
margin-top: -2px; /* FIXME hardcoded value :-/ */
126-
}
127110

128-
.ui-select-container[theme="selectize"] input.ui-select-search-hidden{
129-
opacity: 0;
130-
height: 0;
131-
min-height: 0;
132-
padding: 0;
133-
margin: 0;
134-
border:0;
135-
width: 0;
111+
margin-top: -2px; /* FIXME hardcoded value :-/ */
136112
}
137113

138114
/* Bootstrap theme */
@@ -177,15 +153,6 @@ body > .select2-container.open {
177153
border-bottom-right-radius: 0 !important;
178154
}
179155

180-
.ui-select-bootstrap .ui-select-search-hidden{
181-
opacity: 0;
182-
height: 0;
183-
min-height: 0;
184-
padding: 0;
185-
margin: 0;
186-
border:0;
187-
}
188-
189156
.ui-select-bootstrap > .ui-select-match > .btn{
190157
/* Instead of center because of .btn */
191158
text-align: left !important;
@@ -261,8 +228,7 @@ body > .ui-select-bootstrap.open {
261228
border-right: 1px solid #428bca;
262229
}
263230

264-
.ui-select-bootstrap .ui-select-choices-row>span {
265-
cursor: pointer;
231+
.ui-select-bootstrap .ui-select-choices-row>a {
266232
display: block;
267233
padding: 3px 20px;
268234
clear: both;
@@ -272,21 +238,21 @@ body > .ui-select-bootstrap.open {
272238
white-space: nowrap;
273239
}
274240

275-
.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus {
241+
.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus {
276242
text-decoration: none;
277243
color: #262626;
278244
background-color: #f5f5f5;
279245
}
280246

281-
.ui-select-bootstrap .ui-select-choices-row.active>span {
247+
.ui-select-bootstrap .ui-select-choices-row.active>a {
282248
color: #fff;
283249
text-decoration: none;
284250
outline: 0;
285251
background-color: #428bca;
286252
}
287253

288-
.ui-select-bootstrap .ui-select-choices-row.disabled>span,
289-
.ui-select-bootstrap .ui-select-choices-row.active.disabled>span {
254+
.ui-select-bootstrap .ui-select-choices-row.disabled>a,
255+
.ui-select-bootstrap .ui-select-choices-row.active.disabled>a {
290256
color: #777;
291257
cursor: not-allowed;
292258
background-color: #fff;
@@ -307,63 +273,3 @@ body > .ui-select-bootstrap.open {
307273
.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown {
308274
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
309275
}
310-
311-
.ui-select-bootstrap .ui-select-match-text {
312-
width: 100%;
313-
padding-right: 1em;
314-
}
315-
.ui-select-bootstrap .ui-select-match-text span {
316-
display: inline-block;
317-
width: 100%;
318-
overflow: hidden;
319-
}
320-
.ui-select-bootstrap .ui-select-toggle > a.btn {
321-
position: absolute;
322-
height: 10px;
323-
right: 10px;
324-
margin-top: -2px;
325-
}
326-
327-
/* Spinner */
328-
.ui-select-refreshing {
329-
position: absolute;
330-
right: 0;
331-
padding: 8px 27px;
332-
top: 1px;
333-
display: inline-block;
334-
font-family: 'Glyphicons Halflings';
335-
font-style: normal;
336-
font-weight: normal;
337-
line-height: 1;
338-
-webkit-font-smoothing:antialiased;
339-
}
340-
341-
@-webkit-keyframes ui-select-spin {
342-
0% {
343-
-webkit-transform: rotate(0deg);
344-
transform: rotate(0deg);
345-
}
346-
100% {
347-
-webkit-transform: rotate(359deg);
348-
transform: rotate(359deg);
349-
}
350-
}
351-
@keyframes ui-select-spin {
352-
0% {
353-
-webkit-transform: rotate(0deg);
354-
transform: rotate(0deg);
355-
}
356-
100% {
357-
-webkit-transform: rotate(359deg);
358-
transform: rotate(359deg);
359-
}
360-
}
361-
362-
.ui-select-spin {
363-
-webkit-animation: ui-select-spin 2s infinite linear;
364-
animation: ui-select-spin 2s infinite linear;
365-
}
366-
367-
.ui-select-refreshing.ng-animate {
368-
-webkit-animation: none 0s;
369-
}

0 commit comments

Comments
 (0)