Skip to content

Commit

Permalink
added function to reset the Demo Dropdown when the Generate Network b…
Browse files Browse the repository at this point in the history
…utton is clicked
  • Loading branch information
MilkaZek committed Feb 12, 2025
1 parent 702183d commit 5fbde30
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web-client/public/js/update-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@ const updateModeViews = () =>{
}
};

const resetDemoDropdown = () =>{
$("#demoSourceDropdown option").removeAttr("selected");
$("#demoSourceDropdown").val("none");
};

const checkWorkbookModeSettings = () => {
const hasExpression = hasExpressionData(grnState.workbook.expression);

Expand Down Expand Up @@ -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) ?
Expand Down

0 comments on commit 5fbde30

Please sign in to comment.