Skip to content

fix(angular): fix conditional flexRenderComponent rendering#6218

Open
riccardoperra wants to merge 1 commit intomainfrom
fix/angular-conditional-component-rendering
Open

fix(angular): fix conditional flexRenderComponent rendering#6218
riccardoperra wants to merge 1 commit intomainfrom
fix/angular-conditional-component-rendering

Conversation

@riccardoperra
Copy link
Copy Markdown
Collaborator

@riccardoperra riccardoperra commented Apr 2, 2026

This resolve a rendering issue with flexRenderDirective that doesn't re-render component while using conditional flexRenderComponent return in the same cell column configuration (same cell reference in template, so it's a case where you are not updating table state but relies on external data outside of table scope)

cell: () => {
  if (condition) { 
    return flexRenderComponent(ComponentA)
  }
  return flexRenderComponent(ComponentB)
}

Example:

  • 1st call -> flexRenderComponent(ComponentA)
  • 2nd call -> flexRenderComponent(ComponentB)

Results

before: no-rerender since we were checking only A and B content type (which is always flexRenderComponent)

after: A will be destroyed and B will be created (since component type class is different)

This resolve a rendering issue with flexRenderDirective that doesn't re-render component while using conditional flexRenderComponent return in column configuration
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b03d3982-ccd3-4fa4-af5e-de91bc3fdde8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/angular-conditional-component-rendering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 2, 2026

View your CI Pipeline Execution ↗ for commit 3f6ede2

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1h 1m 17s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-02 20:33:32 UTC

@riccardoperra riccardoperra marked this pull request as ready for review April 2, 2026 19:23
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 2, 2026

More templates

@tanstack/angular-table

npm i https://pkg.pr.new/@tanstack/angular-table@6218

@tanstack/lit-table

npm i https://pkg.pr.new/@tanstack/lit-table@6218

@tanstack/match-sorter-utils

npm i https://pkg.pr.new/@tanstack/match-sorter-utils@6218

@tanstack/qwik-table

npm i https://pkg.pr.new/@tanstack/qwik-table@6218

@tanstack/react-table

npm i https://pkg.pr.new/@tanstack/react-table@6218

@tanstack/react-table-devtools

npm i https://pkg.pr.new/@tanstack/react-table-devtools@6218

@tanstack/solid-table

npm i https://pkg.pr.new/@tanstack/solid-table@6218

@tanstack/svelte-table

npm i https://pkg.pr.new/@tanstack/svelte-table@6218

@tanstack/table-core

npm i https://pkg.pr.new/@tanstack/table-core@6218

@tanstack/vue-table

npm i https://pkg.pr.new/@tanstack/vue-table@6218

commit: 3f6ede2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants