Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix(web): Update set default values on afterCreate
Browse files Browse the repository at this point in the history
  • Loading branch information
EndyKaufman committed Oct 21, 2017
1 parent fd4438a commit b29f3bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion libs/web/src/base/base-modal/base-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ export class BaseModalComponent extends BaseComponent {
this.afterOpen();
});
}
}
afterCreate() {
if (this.hideOnClose === undefined) {
this.hideOnClose = true;
}
if (this.hideButton === false) {
if (this.hideButton === undefined) {
this.hideButton = false;
}
if (this.title === undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Component, EventEmitter, HostListener, Input, Output } from '@angular/c
import { EndpointStatusEnum } from '@rucken/core';

import { BaseComponent } from './../../base/base-component/base-component.component';
import * as _ from 'lodash';

@Component({
selector: 'base-resources-grid',
Expand Down Expand Up @@ -45,7 +46,7 @@ export class BaseResourcesGridComponent extends BaseComponent {
return {};
}
set columns(columns: any) {
if (columns && this.cachedResourcesService && JSON.stringify(this.cachedResourcesService.columns) !== JSON.stringify(columns)) {
if (!_.isEmpty(columns) && this.cachedResourcesService && !_.isEqual(this.cachedResourcesService.columns, columns)) {
this.cachedResourcesService.columns = columns;
this.search(true);
}
Expand Down Expand Up @@ -97,14 +98,13 @@ export class BaseResourcesGridComponent extends BaseComponent {
}
}
afterCreate() {

if (this.loadAll) {
if (this.loadAll === undefined) {
this.loadAll = true;
}
if (this.onEnterEnabled) {
if (this.onEnterEnabled === undefined) {
this.onEnterEnabled = true;
}
if (this.hardReadonly) {
if (this.hardReadonly === undefined) {
this.hardReadonly = true;
}
}
Expand Down

0 comments on commit b29f3bf

Please # to comment.