-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(table): add disconnect to data source #5382
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
@@ -14,4 +14,5 @@ export interface CollectionViewer { | |||
|
|||
export abstract class DataSource<T> { | |||
abstract connect(collectionViewer: CollectionViewer): Observable<T[]>; | |||
disconnect() {} |
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.
Pass the collectionViewer
to the data source?
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.
Makes sense to me, but it does require that all data sources need to implement it now. At least a no-op
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.
You can also mark disconnect
as optional.
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
Please fix the test |
6031ef5
to
a3c9d96
Compare
@andrewseguin Please rebase again. Thanks |
a3c9d96
to
dc9fe87
Compare
Rebased |
* feat(data-table): add disconnect to data source * testing * add collectionviewer to disconnect
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. |
Disconnects the data source when it is no longer used, either by the table being destroyed or another data source taking its place