Skip to content

fix(tree,scrolling): don't require user DataSource to extend DataSource #14966

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

Merged
merged 1 commit into from
Jan 30, 2019

Conversation

crisbeto
Copy link
Member

Currently the way we verify that the passed in data source is by using instanceof which assumes that the consumer has extended our DataSource. In cdk/table we do the verification by checking whether the object matches the interface of a DataSource instead.

These changes add a utility method to check whether something is a data source and refactor the tree and scrolling entry points to be consistent with table.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jan 26, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 26, 2019
@crisbeto crisbeto force-pushed the data-source-instanceof branch from 776665b to 1d342e0 Compare January 26, 2019 13:52
Currently the way we verify that the passed in data source is by using `instanceof` which assumes that the consumer has extended our `DataSource`. In `cdk/table` we do the verification by checking whether the object matches the interface of a `DataSource` instead.

These changes add a utility method to check whether something is a data source and refactor the `tree` and `scrolling` entry points to be consistent with `table`.
@crisbeto crisbeto force-pushed the data-source-instanceof branch from 1d342e0 to fea4a0d Compare January 26, 2019 14:00
@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jan 27, 2019
@mmalerba mmalerba merged commit 0ab8113 into angular:master Jan 30, 2019
mmalerba pushed a commit that referenced this pull request Feb 4, 2019
…ce (#14966)

Currently the way we verify that the passed in data source is by using `instanceof` which assumes that the consumer has extended our `DataSource`. In `cdk/table` we do the verification by checking whether the object matches the interface of a `DataSource` instead.

These changes add a utility method to check whether something is a data source and refactor the `tree` and `scrolling` entry points to be consistent with `table`.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants