Skip to content

Commit d917917

Browse files
authored
Merge branch 'master' into dkamburov/lint-grid-base
2 parents 4891800 + 7353e0b commit d917917

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

projects/igniteui-angular/src/lib/grids/column-actions/column-actions.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ <h4 [attr.id]='titleID' class="igx-column-actions__header-title" *ngIf="title">{
1919
| filterActionColumns:filterCriteria:pipeTrigger
2020
| sortActionColumns:columnDisplayOrder:pipeTrigger;"
2121
class="igx-column-actions__columns-item"
22-
(change)="toggleColumn($event, column)"
22+
[readonly]="true"
23+
(click)="toggleColumn(column)"
2324
[checked]="actionsDirective.columnChecked(column)"
2425
[style.margin-left.px]="column.level * indentation">
2526
{{ column.header || column.field }}

projects/igniteui-angular/src/lib/grids/column-actions/column-actions.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,9 @@ export class IgxColumnActionsComponent implements DoCheck {
406406
/**
407407
* @hidden @internal
408408
*/
409-
public toggleColumn(event: IChangeCheckboxEventArgs, column: IgxColumnComponent) {
409+
public toggleColumn(column: IgxColumnComponent) {
410410
this.actionsDirective.toggleColumn(column);
411411

412-
this.columnToggled.emit({
413-
column,
414-
checked: event.checked
415-
});
412+
this.columnToggled.emit({column, checked: this.actionsDirective.columnChecked(column)});
416413
}
417414
}

projects/igniteui-angular/src/lib/grids/toolbar/grid-toolbar.base.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Directive, Host, Input, EventEmitter, OnDestroy, Output } from '@angular/core';
2-
import { Subject } from 'rxjs';
2+
import { Subject, Subscription } from 'rxjs';
33
import { first, takeUntil } from 'rxjs/operators';
44
import { IgxToggleDirective, ToggleViewCancelableEventArgs, ToggleViewEventArgs } from '../../directives/toggle/toggle.directive';
55
import {
@@ -72,6 +72,7 @@ export abstract class BaseToolbarDirective implements OnDestroy {
7272
public columnToggle = new EventEmitter<IColumnToggledEventArgs>();
7373

7474
private $destroyer = new Subject<boolean>();
75+
private $sub: Subscription;
7576

7677
/**
7778
* Returns the grid containing this component.
@@ -105,7 +106,11 @@ export abstract class BaseToolbarDirective implements OnDestroy {
105106

106107
private _setupListeners(toggleRef: IgxToggleDirective, actions? : IgxColumnActionsComponent) {
107108
if (actions){
108-
actions.columnToggled.subscribe((event) => this.columnToggle.emit(event));
109+
if (!this.$sub || this.$sub.closed){
110+
this.$sub = actions.columnToggled.subscribe((event) => this.columnToggle.emit(event));
111+
} else {
112+
this.$sub.unsubscribe();
113+
}
109114
}
110115
/** The if statement prevents emitting open and close events twice */
111116
if (toggleRef.collapsed) {

src/app/time-picker/time-picker.sample.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h4 class="sample-title">Time Picker with Date value binding</h4>
1313
<h4 class="sample-title">Time Picker with string value binding</h4>
1414
<p class="sample-description">{{showDate(val)}}</p>
1515
<div class="preview">
16-
<igx-time-picker #tp1 [value]="val" [spinLoop]="false" [itemsDelta]="{ hour: 1, minute: 30, second: 20 }"
16+
<igx-time-picker #tp1 [value]="val" [spinLoop]="false" [itemsDelta]="{ hours: 1, minutes: 30, seconds: 20 }"
1717
[inputFormat]="'hh:mm tt'" (valueChange)="updateValue($event)"
1818
(validationFailed)="validationFailed($event)">
1919
</igx-time-picker>

src/app/time-picker/time-picker.sample.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class TimePickerSampleComponent {
1717
@ViewChild('target')
1818
public target: IgxInputDirective;
1919

20-
public itemsDelta = { hour: 1, minute: 15, second: 20 };
20+
public itemsDelta = { hours: 1, minutes: 15, seconds: 20 };
2121
public format = 'hh:mm:ss tt';
2222
public spinLoop = true;
2323
public datePart = DatePart.Hours;

0 commit comments

Comments
 (0)