Skip to content

Commit

Permalink
Merge pull request #2009 from inertiajs/when-visible-prop
Browse files Browse the repository at this point in the history
Rename WhenVisible "elementTag" prop to "as"
  • Loading branch information
joetannenbaum authored Oct 11, 2024
2 parents 93a1fd8 + 74a396e commit a3708b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/svelte/src/components/WhenVisible.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export let data: string | string[] = ''
export let params: ReloadOptions = {}
export let buffer: number = 0
export let elementTag: keyof HTMLElementTagNameMap = 'div'
export let as: keyof HTMLElementTagNameMap = 'div'
export let always: boolean = false
let loaded = false
Expand Down Expand Up @@ -77,7 +77,7 @@
</script>

{#if always || !loaded}
<svelte:element this={elementTag} bind:this={el} />
<svelte:element this={as} bind:this={el} />
{/if}

{#if loaded}
Expand Down

0 comments on commit a3708b4

Please sign in to comment.