Skip to content

Commit

Permalink
fix(module: input-item): fixed custom-keyboard hide (NG-ZORRO#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
sWhite01111 authored and fisherspy committed Oct 9, 2018
1 parent e0850f6 commit 9b8f3da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

<div [ngClass]="wrapperCls">
<table>
<tbody>
<tr>
Expand Down Expand Up @@ -40,4 +40,5 @@
</tr>
</tbody>
</table>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ export class CustomKeyboard implements OnInit, OnDestroy {
prefixCls: string = 'am-number-keyboard';
wrapCls: object;
okText: string = '';
wrapperCls: object;

private _locale: any = {};
private _unsubscribe$ = new Subject<void>();

@Output()
onClick = new EventEmitter<any>();

@HostBinding('class.am-number-keyboard-wrapper')
private _wrapper = true;

constructor(private _localeProvider: LocaleProviderService) {}

tdClick(e) {
Expand All @@ -33,6 +31,9 @@ export class CustomKeyboard implements OnInit, OnDestroy {
this.wrapCls = {
[`${this.prefixCls}-item`]: true
};
this.wrapperCls = {
[`${this.prefixCls}-wrapper`]: true
};
this._localeProvider.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe(_ => {
this._locale = this._localeProvider.getLocaleSubObj('InputItem');
this.okText = this._locale.confirmLabel;
Expand Down

0 comments on commit 9b8f3da

Please sign in to comment.