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