File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
quick-start/src/main/ui/app/entity-modeler Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 66 < i class ="fa fa-close "> </ i >
77 </ mdl-button >
88 </ div >
9- < div class ="mdl-dialog__content ">
9+ < div class ="mdl-dialog__content " #dialogContent >
1010 < div >
1111 < mdl-textfield type ="text " autofocus label ="Title " required [(ngModel)] ="entity.info.title " floating-label > </ mdl-textfield >
1212 </ div >
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ $bg-color: unquote("rgb(#{$palette-datahub-500})");
2121 bottom : 12px ;
2222}
2323
24+ div .selected-entity div .mdl-dialog__content {
25+ display :block ;
26+ overflow :auto ;
27+ max-height :596px ;
28+ width :100% ;
29+ }
30+
2431table .properties {
2532 border-collapse : collapse ;
2633 border : 1px solid #ccc ;
Original file line number Diff line number Diff line change 22 Component ,
33 HostListener ,
44 Inject ,
5+ ElementRef ,
6+ ViewChild
57} from '@angular/core' ;
68
79import { MdlDialogService , MdlDialogReference } from '@angular-mdl/core' ;
@@ -17,7 +19,10 @@ import * as _ from 'lodash';
1719 templateUrl : './entity-editor.component.html' ,
1820 styleUrls : [ './entity-editor.component.scss' ]
1921} )
20- export class EntityEditorComponent {
22+ export class EntityEditorComponent implements AfterViewChecked {
23+
24+ @ViewChild ( 'dialogContent' ) el :ElementRef ;
25+
2126 entity : Entity ;
2227 actions : any ;
2328 dataTypes : Array < any > ;
@@ -41,6 +46,8 @@ export class EntityEditorComponent {
4146 }
4247 ] ;
4348
49+ propAdded : boolean = false ;
50+
4451 // property name pattern: name cannot have space characters in it
4552 readonly PROPERTY_NAME_PATTERN = / ^ [ ^ \s ] + $ / ;
4653
@@ -162,6 +169,14 @@ export class EntityEditorComponent {
162169
163170 addProperty ( ) {
164171 this . entity . definition . properties . push ( new PropertyType ( ) ) ;
172+ this . propAdded = true ;
173+ }
174+
175+ ngAfterViewChecked ( ) {
176+ if ( this . propAdded ) {
177+ this . el . nativeElement . scrollTop = this . el . nativeElement . scrollHeight ;
178+ this . propAdded = false ;
179+ }
165180 }
166181
167182 deleteSelectedProperties ( ) {
You can’t perform that action at this time.
0 commit comments