Skip to content

Commit 293ef1b

Browse files
committed
Fixed parents not showing correctly in dropdown options for feather style
1 parent 1cfff91 commit 293ef1b

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rushvora/angular-2-dropdown-multiselect",
3-
"version": "2.0.0-1",
3+
"version": "2.0.2",
44
"description": "Customizable dropdown multiselect in Angular 2 with bootstrap css.",
55
"main": "dist/bundles/dropdown.umd.js",
66
"module": "dist/index.js",

src/dropdown/dropdown.component.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
<a class="dropdown-item" href="javascript:;" *ngFor="let option of renderFilteredOptions; trackBy: trackById; let i = index;" [class.active]="isSelected(option)"
4242
[ngStyle]="getItemStyle(option)" [ngClass]="option.classes" [class.dropdown-header]="option.isLabel" [ssAutofocus]="option !== focusedItem"
4343
tabindex="-1" (click)="setSelected($event, option)" (keydown.space)="setSelected($event, option)" (keydown.enter)="setSelected($event, option)">
44-
<span *ngIf="!option.isLabel; else label" role="menuitem" tabindex="-1" [style.padding-left]="this.parents.length>0&&this.parents.indexOf(option.id)<0&&'30px'"
45-
[ngStyle]="getItemStyleSelectionDisabled()">
44+
<span *ngIf="!option.isLabel; else label" role="menuitem" tabindex="-1" [ngStyle]="getItemStyleSelectionDisabled()"
45+
[style.padding-left]="this.parents.length>0&&this.parents.indexOf(option.id)<0 && settings.checkedStyle !== 'feather' && '30px'">
4646
<ng-container [ngSwitch]="settings.checkedStyle">
4747
<input *ngSwitchCase="'checkboxes'" type="checkbox" [checked]="isSelected(option)" (click)="preventCheckboxCheck($event, option)"
4848
[disabled]="isCheckboxDisabled(option)" [ngStyle]="getItemStyleSelectionDisabled()"/>
@@ -62,10 +62,11 @@
6262
</div>
6363
</span>
6464
<ng-container *ngSwitchCase="'feather'">
65-
<div class="custom-control custom-checkbox">
65+
<div class="custom-control custom-checkbox" [ngClass]="{'ml-4' : this.parents.length > 0 && this.parents.indexOf(option.id) < 0}">
6666
<input type="checkbox" [checked]="isSelected(option)" (click)="preventCheckboxCheck($event, option)" id="randMultiCheckbox{{i}}"
6767
class="custom-control-input" [disabled]="isCheckboxDisabled(option)" [ngStyle]="getItemStyleSelectionDisabled()" />
68-
<label for="randMultiCheckbox{{i}}" class="custom-control-label">{{option.name}}</label>
68+
<label for="randMultiCheckbox{{i}}" class="custom-control-label"><span
69+
[style.font-weight]="this.parents.indexOf(option.id)>=0?'bold':'normal'">{{option.name}}</span></label>
6970
</div>
7071
</ng-container>
7172
</ng-container>

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rushvora/angular-2-dropdown-multiselect",
3-
"version": "1.9.0",
3+
"version": "2.0.2",
44
"description": "Customizable dropdown multiselect in Angular 2 with bootstrap css.",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)