Skip to content

Commit

Permalink
fix(uiSelectSingle): Tagging without multiple with new tags doesn't w…
Browse files Browse the repository at this point in the history
…orks

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
  • Loading branch information
karthicksundararajan authored and Bogaerts Kristof committed Nov 29, 2016
1 parent 7aabdc4 commit 2641bf6
Show file tree
Hide file tree
Showing 7 changed files with 367 additions and 225 deletions.
110 changes: 8 additions & 102 deletions dist/select.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.19.5 - 2016-10-24T23:13:59.551Z
* Version: 0.18.1 - 2016-07-20T20:40:49.941Z
* License: MIT
*/

Expand Down Expand Up @@ -82,16 +82,6 @@ body > .select2-container.open {
border-bottom-color: #5897fb;
}

.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden,
.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden input{
opacity: 0;
height: 0;
min-height: 0;
padding: 0;
margin: 0;
border:0;
}

/* Selectize theme */

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

/* Fix input width for Selectize theme */
.selectize-control.single > .selectize-input > input {
.selectize-control > .selectize-input > input {
width: 100%;
}

/* Fix line break when there's at least one item selected with the Selectize theme */
.selectize-control.multi > .selectize-input > input {
margin: 0 !important;
}

/* Fix dropdown width for Selectize theme */
.selectize-control > .selectize-dropdown {
width: 100%;
Expand All @@ -122,17 +107,8 @@ body > .select2-container.open {
/* Handle up direction Selectize */
.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown {
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
margin-top: -2px; /* FIXME hardcoded value :-/ */
}

.ui-select-container[theme="selectize"] input.ui-select-search-hidden{
opacity: 0;
height: 0;
min-height: 0;
padding: 0;
margin: 0;
border:0;
width: 0;
margin-top: -2px; /* FIXME hardcoded value :-/ */
}

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

.ui-select-bootstrap .ui-select-search-hidden{
opacity: 0;
height: 0;
min-height: 0;
padding: 0;
margin: 0;
border:0;
}

.ui-select-bootstrap > .ui-select-match > .btn{
/* Instead of center because of .btn */
text-align: left !important;
Expand Down Expand Up @@ -261,8 +228,7 @@ body > .ui-select-bootstrap.open {
border-right: 1px solid #428bca;
}

.ui-select-bootstrap .ui-select-choices-row>span {
cursor: pointer;
.ui-select-bootstrap .ui-select-choices-row>a {
display: block;
padding: 3px 20px;
clear: both;
Expand All @@ -272,21 +238,21 @@ body > .ui-select-bootstrap.open {
white-space: nowrap;
}

.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus {
.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus {
text-decoration: none;
color: #262626;
background-color: #f5f5f5;
}

.ui-select-bootstrap .ui-select-choices-row.active>span {
.ui-select-bootstrap .ui-select-choices-row.active>a {
color: #fff;
text-decoration: none;
outline: 0;
background-color: #428bca;
}

.ui-select-bootstrap .ui-select-choices-row.disabled>span,
.ui-select-bootstrap .ui-select-choices-row.active.disabled>span {
.ui-select-bootstrap .ui-select-choices-row.disabled>a,
.ui-select-bootstrap .ui-select-choices-row.active.disabled>a {
color: #777;
cursor: not-allowed;
background-color: #fff;
Expand All @@ -307,63 +273,3 @@ body > .ui-select-bootstrap.open {
.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown {
box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);
}

.ui-select-bootstrap .ui-select-match-text {
width: 100%;
padding-right: 1em;
}
.ui-select-bootstrap .ui-select-match-text span {
display: inline-block;
width: 100%;
overflow: hidden;
}
.ui-select-bootstrap .ui-select-toggle > a.btn {
position: absolute;
height: 10px;
right: 10px;
margin-top: -2px;
}

/* Spinner */
.ui-select-refreshing {
position: absolute;
right: 0;
padding: 8px 27px;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing:antialiased;
}

@-webkit-keyframes ui-select-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes ui-select-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

.ui-select-spin {
-webkit-animation: ui-select-spin 2s infinite linear;
animation: ui-select-spin 2s infinite linear;
}

.ui-select-refreshing.ng-animate {
-webkit-animation: none 0s;
}
Loading

0 comments on commit 2641bf6

Please sign in to comment.