체크박스 오류 수정

main
이범준 3 months ago
parent daf7f3f71a
commit 0091935e2f

@ -479,12 +479,22 @@ const GRID = {
} }
}, },
countChecked : function(checkboxElement){ countChecked : function(checkboxElement){
var parentEl = $(checkboxElement).parent()[0]; var parentEl = $(checkboxElement).parent()[0];
var tr = $(checkboxElement).parents("tr"); var tr = $(checkboxElement).parents("tr");
var table = $(checkboxElement).parents("table");
var checkboxColIndex = null;
if(parentEl.tagName == "TH"){
var siblings = tr.find("TH");
checkboxColIndex = siblings.index(parentEl);
} else if(parentEl.tagName == "TD"){
var siblings = tr.find("TD"); var siblings = tr.find("TD");
var checkboxColIndex = siblings.index(parentEl); checkboxColIndex = siblings.index(parentEl);
} else {
return null;
}
var table = $(checkboxElement).parents("table");
var tbody = table.find("tbody"); var tbody = table.find("tbody");
var trs = tbody.find("tr"); var trs = tbody.find("tr");

Loading…
Cancel
Save