You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
584 B

  1. <script lang="ts">
  2. import projectGroupStore from "../stores/projectGroup";
  3. export let value = "";
  4. export let name = "";
  5. export let disabled = false;
  6. export let optional = false;
  7. </script>
  8. <select name={name} bind:value={value} disabled={disabled || $projectGroupStore.loading}>
  9. {#if optional}
  10. <option value={""} selected={"" === value}>None</option>
  11. {/if}
  12. {#each $projectGroupStore.groups as group (group.id)}
  13. {#if group.id !== "META_UNGROUPED"}
  14. <option value={group.id} selected={group.id === value}>{group.name}</option>
  15. {/if}
  16. {/each}
  17. </select>