This repository has been archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Click on caret not open dropdown
- Loading branch information
TINANT Hervé
committed
Dec 13, 2017
1 parent
f5805ec
commit d705968
Showing
1 changed file
with
25 additions
and
31 deletions.
There are no files selected for viewing
56 changes: 25 additions & 31 deletions
56
src/ngx-tree-select/src/components/tree-select.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,32 @@ | ||
<div tabindex="0" (keyup)="keyUp($event)" (blur)="onTouched()" class="dropdown open show" [off-click]="clickedOutside"> | ||
|
||
<!-- Control display --> | ||
<div [class.disabled]="disabled"> | ||
<span tabindex="-1" class="btn btn-default btn-secondary form-control" [class.selected-container-text]="!multiple" [class.selected-container-item]="multiple" | ||
(click)="toggle($event)"> | ||
<span *ngIf="selection.length <= 0" | ||
class="ui-select-placeholder text-muted">{{placeholder}}</span> | ||
<!-- Control display --> | ||
<div [class.disabled]="disabled"> | ||
<span tabindex="-1" class="btn btn-default btn-secondary form-control" [class.selected-container-text]="!multiple" [class.selected-container-item]="multiple" | ||
(click)="toggle($event)"> | ||
<span *ngIf="selection.length <= 0" class="ui-select-placeholder text-muted">{{placeholder}}</span> | ||
<span *ngFor="let itm of selection; let idx=index"> | ||
<span *ngIf="moreLoaded || maxVisibleItemCount == 0 || idx<maxVisibleItemCount" | ||
class="pull-left" | ||
[class.selected-item-text]="!multiple" | ||
[class.selected-item-item]="multiple" | ||
[class.btn]="multiple" | ||
[class.btn-default]="multiple" | ||
[class.btn-xs]="multiple"> | ||
{{itm.text}} | ||
<a *ngIf="multiple && !disabled" class="close" (click)="removeItem($event, itm)">x</a> | ||
</span> | ||
<span *ngIf="moreLoaded || maxVisibleItemCount == 0 || idx<maxVisibleItemCount" class="pull-left" [class.selected-item-text]="!multiple" | ||
[class.selected-item-item]="multiple" [class.btn]="multiple" [class.btn-default]="multiple" [class.btn-xs]="multiple"> | ||
{{itm.text}} | ||
<a *ngIf="multiple && !disabled" class="close" (click)="removeItem($event, itm)">x</a> | ||
</span> | ||
</span> | ||
|
||
</span> | ||
|
||
</div> | ||
<div class="enabled"> | ||
<span class="pull-right more-items-icon" (click)="loadMore($event)" *ngIf="showMoreLink">(...)</span> | ||
<i class="caret pull-right"></i> | ||
</div> | ||
</span> | ||
|
||
<!-- options template --> | ||
<ul *ngIf="!disabled && isOpen && internalItems && internalItems.length > 0" class="dropdown-menu" role="menu"> | ||
<input name="filterText" *ngIf="allowFilter" type="text" [(ngModel)]="filter" (click)="setInputFocus()" (blur)="setInputFocusOut()" | ||
class="form-control" placeholder="{{filterPlaceholder}}" [ngModelOptions]="{standalone: true}" autocomplete="off" /> | ||
<li *ngFor="let o of internalItems | itemPipe:filter" role="menuitem"> | ||
<tree-select-item [item]="o" [onTouchedCallBack]="onTouchedCallback"></tree-select-item> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="enabled"> | ||
<span class="pull-right more-items-icon" (click)="loadMore($event)" *ngIf="showMoreLink">(...)</span> | ||
<i class="caret pull-right" (click)="toggle($event)"></i> | ||
</div> | ||
|
||
<!-- options template --> | ||
<ul *ngIf="!disabled && isOpen && internalItems && internalItems.length > 0" class="dropdown-menu" role="menu"> | ||
<input name="filterText" *ngIf="allowFilter" type="text" [(ngModel)]="filter" (click)="setInputFocus()" (blur)="setInputFocusOut()" | ||
class="form-control" placeholder="{{filterPlaceholder}}" [ngModelOptions]="{standalone: true}" autocomplete="off" /> | ||
<li *ngFor="let o of internalItems | itemPipe:filter" role="menuitem"> | ||
<tree-select-item [item]="o" [onTouchedCallBack]="onTouchedCallback"></tree-select-item> | ||
</li> | ||
</ul> | ||
</div> |