From 3599fb73b05576ff3c3d78584c268d78507fabd1 Mon Sep 17 00:00:00 2001 From: dauglyon Date: Mon, 25 Mar 2019 11:53:52 -0400 Subject: [PATCH] fixes list addition and create in col#2+ --- js/source/modules/wizard-search.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/source/modules/wizard-search.js b/js/source/modules/wizard-search.js index a92c3207e..d613457d9 100644 --- a/js/source/modules/wizard-search.js +++ b/js/source/modules/wizard-search.js @@ -266,10 +266,11 @@ export function Wizard(main_id,col_number){ reflow(d.index,true); }) allCols.select(".wizard-create-list").on("click",function(d){ - var listName = d3.select(".wizard-create-list-name").property("value"); + var thiscol = allCols.filter(c_d=>c_d==d); + var listName = thiscol.select(".wizard-create-list-name").property("value"); if(listName!=""){ d3.select(this).attr("disabled",true); - d3.select(".wizard-create-list-name").property("value",""); + thiscol.select(".wizard-create-list-name").property("value",""); Promise.resolve(create_list( listName, d.selectedList.get().map(i=>i.value) @@ -279,10 +280,12 @@ export function Wizard(main_id,col_number){ } }); allCols.select(".wizard-add-to-list").on("click",function(d){ - var listID = d3.select(".wizard-add-to-list-id").property("value").slice(list_prefix.length); + var thiscol = allCols.filter(c_d=>c_d==d); + var listName = thiscol.select(".wizard-create-list-name").property("value"); + var listID = thiscol.select(".wizard-add-to-list-id").property("value").slice(list_prefix.length); if(listID!=""){ d3.select(this).attr("disabled",true); - d3.select(".wizard-add-to-list-id").property("value",""); + thiscol.select(".wizard-add-to-list-id").property("value",""); Promise.resolve(add_to_list( listID, d.selectedList.get().map(i=>i.value) -- 2.11.4.GIT