-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(tree): add data sources for tree #9036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0c395a2
to
202b97f
Compare
* level: 2 | ||
* } | ||
*/ | ||
export class MatTreeFlattener<T, F> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow what T
and F
are. Is one the type of node and one the type of data? If so, should the type of node include an extends
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline and added comments about this.
*/ | ||
export class MatTreeNestedDataSource<T> implements DataSource<T> { | ||
_renderedData = new BehaviorSubject<T[]>([]); | ||
get renderedData(): T[] { return this._renderedData.value; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow what renderedData
is needed/used for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. data
is enough
*/ | ||
export class MatTreeFlatDataSource<T, F> implements DataSource<F> { | ||
_flattenedData = new BehaviorSubject<F[]>([]); | ||
get flattenedData() { return this._flattenedData.value; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why expose flattenedData
in addition to the data stream coming back from connect
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed getters
efc6bbf
to
8d20750
Compare
873b70d
to
297a357
Compare
Poke @andrewseguin |
297a357
to
914e7da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I think this should include changes to the tree.md by adding a Getting Started guide to the docs and using this with the examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.