Added selected class to data provider options.

This commit is contained in:
Conor Webb 2023-10-27 10:55:19 +01:00
parent 0f8a34d982
commit d0ea6edad3
1 changed files with 8 additions and 8 deletions

View File

@ -284,7 +284,7 @@
</div> </div>
<ul> <ul>
{#each tables as table} {#each tables as table}
<li on:click={() => handleSelected(table)}>{table.label}</li> <li class:selected={value.label === table.label} on:click={() => handleSelected(table)}>{table.label}</li>
{/each} {/each}
</ul> </ul>
{#if views?.length} {#if views?.length}
@ -294,7 +294,7 @@
</div> </div>
<ul> <ul>
{#each views as view} {#each views as view}
<li on:click={() => handleSelected(view)}>{view.label}</li> <li class:selected={value.label === view.label} on:click={() => handleSelected(view)}>{view.label}</li>
{/each} {/each}
</ul> </ul>
{/if} {/if}
@ -306,7 +306,7 @@
<ul> <ul>
{#each queries as query} {#each queries as query}
<li <li
class:selected={value === query} class:selected={value.label === query.label}
on:click={() => handleSelected(query)} on:click={() => handleSelected(query)}
> >
{query.label} {query.label}
@ -321,7 +321,7 @@
</div> </div>
<ul> <ul>
{#each links as link} {#each links as link}
<li on:click={() => handleSelected(link)}>{link.label}</li> <li class:selected={value.label === link.label} on:click={() => handleSelected(link)}>{link.label}</li>
{/each} {/each}
</ul> </ul>
{/if} {/if}
@ -332,7 +332,7 @@
</div> </div>
<ul> <ul>
{#each fields as field} {#each fields as field}
<li on:click={() => handleSelected(field)}>{field.label}</li> <li class:selected={value.label === field.label} on:click={() => handleSelected(field)}>{field.label}</li>
{/each} {/each}
</ul> </ul>
{/if} {/if}
@ -343,7 +343,7 @@
</div> </div>
<ul> <ul>
{#each jsonArrays as field} {#each jsonArrays as field}
<li on:click={() => handleSelected(field)}>{field.label}</li> <li class:selected={value.label === field.label} on:click={() => handleSelected(field)}>{field.label}</li>
{/each} {/each}
</ul> </ul>
{/if} {/if}
@ -355,7 +355,7 @@
<ul> <ul>
{#each dataProviders as provider} {#each dataProviders as provider}
<li <li
class:selected={value === provider} class:selected={value.label === provider.label}
on:click={() => handleSelected(provider)} on:click={() => handleSelected(provider)}
> >
{provider.label} {provider.label}
@ -368,7 +368,7 @@
<Heading size="XS">Other</Heading> <Heading size="XS">Other</Heading>
</div> </div>
<ul> <ul>
<li on:click={() => handleSelected(custom)}>{custom.label}</li> <li class:selected={value.label === custom.label} on:click={() => handleSelected(custom)}>{custom.label}</li>
{#if otherSources?.length} {#if otherSources?.length}
{#each otherSources as source} {#each otherSources as source}
<li on:click={() => handleSelected(source)}>{source.label}</li> <li on:click={() => handleSelected(source)}>{source.label}</li>