Skip to content

Commit

Permalink
Fixed #230
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Apr 26, 2016
1 parent eb0d902 commit 96f75e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const DROPDOWN_VALUE_ACCESSOR: Provider = CONST_EXPR(
<div [ngClass]="{'ui-dropdown ui-widget ui-state-default ui-corner-all ui-helper-clearfix':true,'ui-state-hover':hover&&!disabled,'ui-state-focus':focus,'ui-state-disabled':disabled}"
(mouseenter)="onMouseenter($event)" (mouseleave)="onMouseleave($event)" (click)="onMouseclick($event,in)" [attr.style]="style" [attr.styleClass]="styleClass">
<div class="ui-helper-hidden-accessible">
<select>
<option *ngFor="#option of options" [value]="option.value">{{option.label}}</option>
<select [required]="required">
<option *ngFor="#option of options" [value]="option.value" [selected]="value == option.value">{{option.label}}</option>
</select>
</div>
<div class="ui-helper-hidden-accessible">
Expand Down Expand Up @@ -68,6 +68,8 @@ export class Dropdown implements OnInit,AfterViewInit,AfterViewChecked,DoCheck,O

@Input() autoWidth: boolean = true;

@Input() required: boolean;

@ContentChild(TemplateRef) itemTemplate: TemplateRef;

constructor(private el: ElementRef, private domHandler: DomHandler, private renderer: Renderer, differs: IterableDiffers) {
Expand Down
6 changes: 6 additions & 0 deletions showcase/demo/dropdown/dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ <h3>Attributes</h3>
<td>true</td>
<td>Calculates the width based on options width, set to false for custom width.</td>
</tr>
<tr>
<td>required</td>
<td>boolean</td>
<td>false</td>
<td>When present, it specifies that an input field must be filled out before submitting the form.</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit 96f75e0

Please sign in to comment.