Skip to content

Commit be380e4

Browse files
author
pipeline
committed
bug(EJ2-4521): DropDown component's ng samples corrected.
1 parent 8630d11 commit be380e4

File tree

11 files changed

+50
-16
lines changed

11 files changed

+50
-16
lines changed

src/autocomplete/default-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/autocomplete/default.component.ts

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,30 @@ import { AutoCompleteComponent } from '@syncfusion/ej2-ng-dropdowns';
1010
export class DefaultAutoCompleteComponent {
1111
@ViewChild('sample')
1212
public AutoCompleteObj: AutoCompleteComponent;
13-
public sportsData: string[] = ['Badminton', 'Basketball', 'Cricket',
14-
'Football', 'Golf', 'Gymnastics',
15-
'Hockey', 'Rugby', 'Snooker', 'Tennis'];
13+
public sportsData: Object[] = [
14+
{ id: 'Game1', game: 'American Football' },
15+
{ id: 'Game2', game: 'Badminton' },
16+
{ id: 'Game3', game: 'Basketball' },
17+
{ id: 'Game4', game: 'Cricket' },
18+
{ id: 'Game5', game: 'Football' },
19+
{ id: 'Game6', game: 'Golf' },
20+
{ id: 'Game7', game: 'Hockey' },
21+
{ id: 'Game8', game: 'Rugby' },
22+
{ id: 'Game9', game: 'Snooker' },
23+
{ id: 'Game10', game: 'Tennis' }
24+
];
25+
public fields: Object = { value: 'game' };
1626
public value: string = 'Basketball';
1727
public waterMark: string = 'e.g. Basketball';
28+
public height: string = '250px';
29+
public onChange(args: any): void {
30+
let valueEle: HTMLInputElement = document.getElementsByClassName('e-input')[0] as HTMLInputElement;
31+
let text: Element = document.getElementById('text');
32+
if (this.AutoCompleteObj.value === "null" || this.AutoCompleteObj.value === null || this.AutoCompleteObj.value === "") {
33+
valueEle.value = '';
34+
}
35+
}
36+
ngAfterViewInit(e: any): void {
37+
this.onChange(e);
38+
}
1839
}

src/autocomplete/default.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
<div class="control-section">
2-
<div class="col-lg-12 content-wrapper" style="height: 350px">
2+
<div class="col-lg-8 content-wrapper" style="height: 350px">
33
<div id='content' style="margin: 0 auto; width:250px; padding-top: 30px">
4-
<ej-autocomplete id='games' #sample [dataSource]='sportsData' [value]='value'
5-
[placeholder]='waterMark'></ej-autocomplete>
4+
<ej-autocomplete id='games' #sample [dataSource]='sportsData' [(value)]='value'
5+
[placeholder]='waterMark' [fields]='fields' (change)='onChange($event)'></ej-autocomplete>
6+
</div>
7+
</div>
8+
<div class="col-lg-4 property-section">
9+
<div class="property-panel-section">
10+
<div class="property-panel-header">Properties</div>
11+
<div class="property-panel-content">
12+
<table id="property" title="Properties" style="width: 100%; margin:10px">
13+
<tr>
14+
<td style="padding:5px; width:25%">Value</td>
15+
<td>:<input type='text' id='values' [(ngModel)]='value' class='e-input' style='margin-left:10px; width:140px'/></td>
16+
</tr>
17+
</table>
18+
</div>
619
</div>
720
</div>
821
</div>

src/autocomplete/template-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/autocomplete/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="control-section">
2-
<div id='content' style="margin: 0px auto; width:250px; padding-top: 40px;">
2+
<div id='content' style="margin: 0px auto; width:300px; padding-top: 40px;">
33
<ej-autocomplete id='employees' [dataSource]='data' [fields]='fields' [placeholder]='watermark'>
44
<ng-template #headerTemplate>
55
<div class="head"> <span class="photo">Photo</span> <span style="margin-left:17px;">Employee Info</span></div>

src/combobox/databinding-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/combobox/databinding.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
background: transparent;
3232
}
3333

34-
.e-input-group.e-ddl .e-input-group-icon.e-spinner-icon {
35-
border: none;
34+
.e-combobox .e-input-group.e-ddl .e-input-group-icon.e-spinner-icon {
35+
border-left: 1px solid transparent;
3636
}

src/combobox/template-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/combobox/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="control-section">
2-
<div id='content' style="margin: 0px auto; width:250px; padding-top: 40px;">
2+
<div id='content' style="margin: 0px auto; width:300px; padding-top: 40px;">
33
<ej-combobox id='employees' [dataSource]='data' [fields]='fields' [popupHeight]='height' [placeholder]='watermark'>
44
<ng-template #headerTemplate>
55
<div class="head"> <span class="photo">Photo</span> <span style="margin-left:17px;">Employee Info</span></div>

src/dropdownlist/template-plnkr.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)