Skip to content

Commit

Permalink
chore: fix svelte 5 deprecation warning
Browse files Browse the repository at this point in the history
Fixes #9313.

Signed-off-by: Tim deBoer <[email protected]>
  • Loading branch information
deboer-tim committed Oct 21, 2024
1 parent 6eb2c16 commit d9ff198
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/ui/src/lib/table/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,7 @@ function toggleChildren(name: string | undefined): void {
{#if column.info.renderer}
<svelte:component
this={column.info.renderer}
object={column.info.renderMapping ? column.info.renderMapping(object) : object}
on:update />
object={column.info.renderMapping ? column.info.renderMapping(object) : object} />
{/if}
</div>
{/each}
Expand Down Expand Up @@ -312,8 +311,7 @@ function toggleChildren(name: string | undefined): void {
{#if column.info.renderer}
<svelte:component
this={column.info.renderer}
object={column.info.renderMapping ? column.info.renderMapping(child) : child}
on:update />
object={column.info.renderMapping ? column.info.renderMapping(child) : child} />
{/if}
</div>
{/each}
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/lib/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* SPDX-License-Identifier: Apache-2.0
***********************************************************************/

import type { ComponentType, SvelteComponent } from 'svelte';
import type { Component } from 'svelte';

/**
* Options to be used when creating a Column.
Expand Down Expand Up @@ -49,7 +49,7 @@ export interface ColumnInformation<Type, RenderType = Type> {
* The component must have a property 'object' that has the
* same type as the Column.
*/
readonly renderer?: ComponentType<SvelteComponent<{ object: RenderType }>>;
readonly renderer?: Component<{ object: RenderType }>;

/**
* Set a comparator used to sort the data by the values in this column.
Expand Down

0 comments on commit d9ff198

Please sign in to comment.