components icon indicating copy to clipboard operation
components copied to clipboard

bug(CdkTable): using ConnectableObservable as data source

Open tchandelle opened this issue 4 years ago • 1 comments

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When using a ConnectableObservable or Connectable as a data source for table, this issue occurs:

ERROR TypeError: dataStream.pipe is not a function
    at MatTable._observeRenderChanges (table.mjs:1766:14)
    at MatTable.ngAfterContentChecked (table.mjs:1415:18)
    at callHook (core.mjs:2505:18)
    at callHooks (core.mjs:2464:17)
    at executeInitAndCheckHooks (core.mjs:2415:9)
    at refreshView (core.mjs:12029:21)
    at refreshComponent (core.mjs:13084:13)
    at refreshChildComponents (core.mjs:11778:9)
    at refreshView (core.mjs:12038:13)
    at refreshComponent (core.mjs:13084:13)

Reproduction

https://stackblitz.com/edit/angular-mueyxc?file=src/app/table-basic-example.ts

Expected Behavior

Should be considered as an Observable

Actual Behavior

It is considered a DataSource, because of the connect() method

Environment

  • Angular: 14.1.1
  • CDK/Material: 14.1.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Linux Mint

tchandelle avatar Aug 17 '22 17:08 tchandelle

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.