Bug #136 Refactorización DropDown
This commit is contained in:
parent
2594f170cf
commit
a01fa0e9ad
|
@ -8,18 +8,12 @@
|
|||
on-close="$ctrl.onClose()">
|
||||
<div class="dropdown">
|
||||
<div ng-show="$ctrl.showFilter" class="filter">
|
||||
<input
|
||||
type="text"
|
||||
ng-model="$ctrl.search"
|
||||
tabindex="-1"
|
||||
<vn-textfield
|
||||
model="$ctrl.search"
|
||||
class="search"
|
||||
ng-blur="$ctrl.onFocusOut()"
|
||||
translate-attr="{placeholder: 'Search'}"/>
|
||||
<vn-icon
|
||||
icon="clear"
|
||||
ng-click="$ctrl.onClearClick()"
|
||||
translate-attr="{title: 'Clear'}">
|
||||
</vn-icon>
|
||||
label = "Search">
|
||||
</vn-textfield>
|
||||
</div>
|
||||
<div class="list" tabindex="-1">
|
||||
<ul
|
||||
|
|
|
@ -20,7 +20,7 @@ export default class DropDown extends Component {
|
|||
}
|
||||
|
||||
$postLink() {
|
||||
this.input = this.element.querySelector('.search');
|
||||
this.input = this.element.querySelector('.search input');
|
||||
this.ul = this.element.querySelector('ul');
|
||||
this.list = this.element.querySelector('.list');
|
||||
this.list.addEventListener('scroll', e => this.onScroll(e));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import "effects";
|
||||
@import "colors";
|
||||
|
||||
vn-drop-down {
|
||||
.dropdown {
|
||||
|
@ -13,9 +14,17 @@ vn-drop-down {
|
|||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
border-bottom: 1px solid #ccc;
|
||||
font-size: inherit;
|
||||
padding: .6em;
|
||||
margin: 0!important;
|
||||
&.not-empty label{
|
||||
display: none;
|
||||
}
|
||||
& .selected label {
|
||||
font-size: inherit;
|
||||
bottom: 2px;
|
||||
color: $secondary-font-color;
|
||||
}
|
||||
}
|
||||
& > vn-icon[icon=clear] {
|
||||
display: none;
|
||||
|
|
Loading…
Reference in New Issue