Skip to content

Commit

Permalink
trying to patch datawrapperswitching
Browse files Browse the repository at this point in the history
  • Loading branch information
aleszu committed Jan 8, 2025
1 parent 79890cb commit 481ee54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Next

## v0.12.6
- Patch: DatawrapperSwitching story to wrap the bottom block in `if` instead of `key`.

## v0.12.5
- Patch: Headline eyebrows in Drupal include a link to the Story or Data tool homepage; tweaked Headline component to do the same.
- Fix: CSS Theme variable --color-green was #ffb748, which is a kind of yellow. Changed to match style guide.
Expand Down
8 changes: 4 additions & 4 deletions src/docs/stories/DatawrapperSwitching.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
bind:value={selectedChart}
placeholder={null}
/>
{#key selectedChart}
{#if selectedChart}
<DatawrapperIframe
datawrapperId={selectedChartMetadata.value}
title={selectedChartMetadata.label}
ariaLabel={selectedChartMetadata.ariaLabel}
/>
{/key}
{/if}
</Story>

<Story
Expand Down Expand Up @@ -155,13 +155,13 @@
<Button on:click={() => (selectedChart = "Toh1S")}>Chart #1</Button>
<Button on:click={() => (selectedChart = "rgLU1")}>Chart #2</Button>

{#key selectedChart}
{#if selectedChart}
<LoadingWrapper let:setChildLoaded let:setChildLoading>
<DatawrapperIframe
datawrapperId={selectedChartLoading}
on:startrender={setChildLoading}
on:visrendered={setChildLoaded}
/>
</LoadingWrapper>
{/key}
{/if}
</Story>

0 comments on commit 481ee54

Please sign in to comment.