From 5fbde302af5f86ca47bdb9309b2fcca7fbff8903 Mon Sep 17 00:00:00 2001 From: MilkaZek <143560370+MilkaZek@users.noreply.github.com> Date: Tue, 11 Feb 2025 22:28:17 -0800 Subject: [PATCH] added function to reset the Demo Dropdown when the Generate Network button is clicked --- web-client/public/js/update-app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web-client/public/js/update-app.js b/web-client/public/js/update-app.js index 76329c54..a88c1b58 100644 --- a/web-client/public/js/update-app.js +++ b/web-client/public/js/update-app.js @@ -549,6 +549,11 @@ const updateModeViews = () =>{ } }; +const resetDemoDropdown = () =>{ + $("#demoSourceDropdown option").removeAttr("selected"); + $("#demoSourceDropdown").val("none"); +}; + const checkWorkbookModeSettings = () => { const hasExpression = hasExpressionData(grnState.workbook.expression); @@ -592,6 +597,11 @@ $(NETWORK_MODE_GRN).on("click", () => { checkWorkbookModeSettings(); refreshApp(); }); +$("body").on("click", "#submit-network", function () { + resetDemoDropdown(); + checkWorkbookModeSettings(); + refreshApp(); +}); const shortenExpressionSheetName = (name) => { return (name.length > MAX_NUM_CHARACTERS_DROPDOWN) ?