Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add removed classes while changed on grid panel #881

Merged
merged 2 commits into from
Jun 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 9 additions & 10 deletions library/src/lib/panel/panel-grid/panel-grid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@ import { AbstractFdNgxClass } from '../../utils/abstract-fd-ngx-class';
export class PanelGridComponent extends AbstractFdNgxClass {

/** Number of columns for the grid. */
@Input()
col: number;
@Input() col: number;

/** Whether the grid shoul have a gap. */
@Input()
@HostBinding('class.fd-panel-grid--nogap')
nogap: boolean = false;

/** @hidden */
@HostBinding('class.fd-panel-grid')
fdPanelGridClass: boolean = true;
/** Whether the grid should have a gap. */
@Input() nogap: boolean = false;

/** @hidden */
constructor(private elementRef: ElementRef) {
Expand All @@ -31,6 +24,12 @@ export class PanelGridComponent extends AbstractFdNgxClass {

/** @hidden */
_setProperties() {
this._addClassToElement('fd-panel-grid');

if (this.nogap) {
this._addClassToElement('fd-panel-grid--nogap');
}

if (this.col) {
this._addClassToElement('fd-panel-grid--' + this.col + 'col');
}
Expand Down