Skip to content

Commit

Permalink
perf(docs): use CSS to hide filtered icons instead of re-rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Oct 7, 2024
1 parent 1644a50 commit b1ce5ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/src/components/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,19 @@
</Row>
<Row>
<Column>
<div class="grid">
<ul class="grid">
{#each pictogramNames as pictogram (pictogram)}
{#if filteredModuleNames.includes(pictogram)}
{@const isFiltered = filteredModuleNames.includes(pictogram)}
<li style:display={isFiltered ? "inline" : "none"}>
<ClickableTile
title={pictogram}
on:click={() => (moduleName = pictogram)}
>
<svelte:component this={pictograms[pictogram]} />
</ClickableTile>
{/if}
</li>
{/each}
</div>
</ul>
</Column>
</Row>
</Grid>
Expand Down

0 comments on commit b1ce5ba

Please sign in to comment.