Skip to content

Commit

Permalink
Merge pull request #158 from HootDunk/bug/table-view-cannot-select-row
Browse files Browse the repository at this point in the history
don't use default value for array prop as svelte handles them in inco…
  • Loading branch information
JackDiSalvatore authored Mar 12, 2024
2 parents b14375a + 4cb96f0 commit dac7679
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/components/SelectedValues.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { SelectedValue } from '$lib/services/Libre311/Libre311';
export let selectedValues: SelectedValue[] = [];
export let selectedValues: SelectedValue[];
</script>

{#each selectedValues as selectedValue}
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/lib/components/ServiceRequestDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@
<p class="text-sm">{serviceRequest.address}</p>
</div>

<div class="mb-1">
<SelectedValues selectedValues={serviceRequest.selected_values} />
</div>

{#if serviceRequest.selected_values}
<div class="mb-1">
<SelectedValues selectedValues={serviceRequest.selected_values} />
</div>
{/if}
{#if serviceRequest.description}
<div class="mb-1">
<strong class="text-base">{messages['serviceRequest']['description']}</strong>
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/lib/components/ServiceRequestUpdate.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@
<p class="text-sm">{serviceRequest.address}</p>
</div>

<div class="mb-1">
<SelectedValues selectedValues={serviceRequest.selected_values} />
</div>
{#if serviceRequest.selected_values}
<div class="mb-1">
<SelectedValues selectedValues={serviceRequest.selected_values} />
</div>
{/if}

{#if serviceRequest.description}
<div class="mb-1">
Expand Down

0 comments on commit dac7679

Please sign in to comment.