From c6fdb1766e2598557341c9defdf6268db9a78e39 Mon Sep 17 00:00:00 2001 From: Jorrit Boekel Date: Thu, 19 Dec 2024 14:26:23 +0100 Subject: [PATCH] Fix bug in dyn dropdown select - could no longer have "new" input which is not in the select list --- src/frontend/datasets/src/DynamicSelect.svelte | 1 - src/frontend/datasets/src/MSSamplePrepComp.svelte | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/frontend/datasets/src/DynamicSelect.svelte b/src/frontend/datasets/src/DynamicSelect.svelte index d261380e..20dcfac0 100644 --- a/src/frontend/datasets/src/DynamicSelect.svelte +++ b/src/frontend/datasets/src/DynamicSelect.svelte @@ -52,7 +52,6 @@ export function inputdone() { if (selectval && selectval in fixedoptions) { intext = niceName(fixedoptions[selectval]); } else { - intext = ''; selectval = false; } if (!mouseSelect) { diff --git a/src/frontend/datasets/src/MSSamplePrepComp.svelte b/src/frontend/datasets/src/MSSamplePrepComp.svelte index 03aca6fc..076aad9c 100644 --- a/src/frontend/datasets/src/MSSamplePrepComp.svelte +++ b/src/frontend/datasets/src/MSSamplePrepComp.svelte @@ -13,6 +13,7 @@ export let errors; let samplepreperrors = []; let useTrackingPipeline = false; let selectedPipeline = false; +let pipelineName = ''; let pipelines = {}; let pipeselector; let dset_pipe_id; @@ -77,6 +78,8 @@ function togglePipeline() { if (useTrackingPipeline) { useTrackingPipeline = false; selectedPipeline = false; + // Blank the pipeline name from the selector + pipelineName = ''; // If we run immediately then the selectedPipeline will not be updated yet setTimeout(pipeselector.inputdone, 20); editMade(); @@ -117,7 +120,12 @@ onMount(async() => {
Use a tracking pipeline - x.name} on:selectedvalue={pipelineSelected} /> + x.name} + on:selectedvalue={pipelineSelected} />
{#if useTrackingPipeline && selectedPipeline && dset_pipe_id}