Skip to content

Commit

Permalink
Don't try to @render svelte components in FlexRender
Browse files Browse the repository at this point in the history
Svelte Components should not be @render'd, only snippets get @render'd, per the docs
Unlike Svelte 4, the Component in FlexRender will already be dynamically evaluated.

This fixes examples/svelte/sorting for Svelte 5.
  • Loading branch information
dberlin authored Mar 2, 2025
1 parent b5339c5 commit 5ddc0ca
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/svelte-table/src/FlexRender.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
{:else if isFunction(content)}
{@const result = content(context as any)}
{#if result instanceof RenderComponentConfig}
{@render result.component(result.props)}
{@const { component: Component, props } = result}
<Component {...props} />
{:else if result instanceof RenderSnippetConfig}
Expand Down

0 comments on commit 5ddc0ca

Please sign in to comment.