Browse Source

fix project-select showing empty status categories.

main
Gisle Aune 4 years ago
parent
commit
48b439af4f
  1. 3
      svelte-ui/src/components/ProjectSelect.svelte

3
svelte-ui/src/components/ProjectSelect.svelte

@ -1,4 +1,5 @@
<script lang="ts">
import { group } from "console";
import type Project from "../models/project";
import authStore from "../stores/auth";
import projectStore from "../stores/project";
@ -69,10 +70,12 @@ import authStore from "../stores/auth";
<option value={""} selected={"" === value}>None</option>
{/if}
{#each optGroups as group (group.status)}
{#if group.projects.length > 0}
<optgroup label={group.status}>
{#each group.projects as project (project.id)}
<option value={project.id} selected={project.id === value}>{project.name}</option>
{/each}
</optgroup>
{/if}
{/each}
</select>
Loading…
Cancel
Save