File tree 1 file changed +16
-4
lines changed
projects/angular-nodegui/src/lib/components
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' ;
2
2
import { NgComponent } from './component' ;
3
3
import { RendererStyleFlags2 } from '@angular/core' ;
4
4
@@ -7,10 +7,16 @@ export class NgScrollArea extends QScrollArea implements NgComponent {
7
7
public parent : any ;
8
8
9
9
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 ) ;
11
15
}
12
16
13
- public insertBefore ( newChild : any , refChild : any ) { }
17
+ public insertBefore ( newChild : any , refChild : any ) {
18
+ throw new Error ( 'Method not implemented.' ) ;
19
+ }
14
20
15
21
public setNgAttribute (
16
22
name : string ,
@@ -44,9 +50,15 @@ export class NgScrollArea extends QScrollArea implements NgComponent {
44
50
removeAttribute ( name : string , namespace ?: string ) : void {
45
51
throw new Error ( 'Method not implemented.' ) ;
46
52
}
53
+
47
54
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 ( ) ;
49
60
}
61
+
50
62
removeClass ( name : string ) : void {
51
63
throw new Error ( 'Method not implemented.' ) ;
52
64
}
You can’t perform that action at this time.
0 commit comments