Skip to content

Commit cfe146f

Browse files
authored
fix(tree-list): deprecated for Angular 6 compatibility (#376)
Deprecated the tree-list component due to issues with Angular 6 and mobx autorun, introduced by angular-tree-component. Fixes patternfly/patternfly-ng#381
1 parent d3083ac commit cfe146f

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

src/app/list/tree-list/example/tree-list-example.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="padding-15">
22
<div class="row">
33
<div class="col-sm-12">
4-
<h4>Tree List Component Example</h4>
4+
<h4>Tree List Component Example (deprecated)</h4>
55
<hr/>
66
</div>
77
</div>

src/app/list/tree-list/tree-list-config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import { ListConfigBase } from '../list-config-base';
22

33
/**
44
* A config containing properties for tree list
5+
*
6+
* @deprecated The tree-list component is deprecated due to issues with Angular 6 and mobx autorun,
7+
* introduced by angular-tree-component.
8+
*
9+
* See: https://github.com/patternfly/patternfly-ng/issues/381
510
*/
611
export class TreeListConfig extends ListConfigBase {
712
/**

src/app/list/tree-list/tree-list.component.ts

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ import { TreeListConfig } from './tree-list-config';
3434
*
3535
* Or:
3636
* <br/><code>import { TreeListModule } from 'patternfly-ng';</code>
37+
*
38+
* @deprecated The tree-list component is deprecated due to issues with Angular 6 and mobx autorun,
39+
* introduced by angular-tree-component.
40+
*
41+
* See: https://github.com/patternfly/patternfly-ng/issues/381
3742
*/
3843
@Component({
3944
encapsulation: ViewEncapsulation.None,

src/app/list/tree-list/tree-list.module.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import { TreeListComponent } from './tree-list.component';
99

1010
/**
1111
* A module containing objects associated with tree list components
12+
*
13+
* @deprecated The tree-list component is deprecated due to issues with Angular 6 and mobx autorun,
14+
* introduced by angular-tree-component.
15+
*
16+
* See: https://github.com/patternfly/patternfly-ng/issues/381
1217
*/
1318
@NgModule({
1419
imports: [
@@ -20,4 +25,9 @@ import { TreeListComponent } from './tree-list.component';
2025
declarations: [TreeListComponent],
2126
exports: [TreeListComponent]
2227
})
23-
export class TreeListModule {}
28+
export class TreeListModule {
29+
constructor() {
30+
console.log('patternfly-ng: The tree-list component is deprecated due to issues with Angular 6 and ' +
31+
'mobx autorun, introduced by angular-tree-component.');
32+
}
33+
}

0 commit comments

Comments
 (0)