File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
projects/angular-nodegui/src/lib/components Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 1- import { QScrollArea } from '@nodegui/nodegui' ;
1+ import { QScrollArea , FlexLayout } from '@nodegui/nodegui' ;
22import { NgComponent } from './component' ;
33import { RendererStyleFlags2 } from '@angular/core' ;
44
@@ -7,10 +7,16 @@ export class NgScrollArea extends QScrollArea implements NgComponent {
77 public parent : any ;
88
99 public appendChild ( newChild : any ) : void {
10- throw new Error ( 'Method not implemented.' ) ;
10+ if ( this . contentWidget ) {
11+ console . warn ( 'ScrollView cant have more than one child node' ) ;
12+ return ;
13+ }
14+ this . setWidget ( newChild ) ;
1115 }
1216
13- public insertBefore ( newChild : any , refChild : any ) { }
17+ public insertBefore ( newChild : any , refChild : any ) {
18+ throw new Error ( 'Method not implemented.' ) ;
19+ }
1420
1521 public setNgAttribute (
1622 name : string ,
@@ -44,9 +50,15 @@ export class NgScrollArea extends QScrollArea implements NgComponent {
4450 removeAttribute ( name : string , namespace ?: string ) : void {
4551 throw new Error ( 'Method not implemented.' ) ;
4652 }
53+
4754 removeChild ( oldChild : any ) : void {
48- throw new Error ( 'Method not implemented.' ) ;
55+ const removedChild = this . takeWidget ( ) ;
56+ if ( removedChild ) {
57+ removedChild . close ( ) ;
58+ }
59+ oldChild . close ( ) ;
4960 }
61+
5062 removeClass ( name : string ) : void {
5163 throw new Error ( 'Method not implemented.' ) ;
5264 }
You can’t perform that action at this time.
0 commit comments