오류 수정

main
이범준 3 months ago
parent 2bd4e17c89
commit 3bacda31b1

@ -4,7 +4,8 @@
function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){
var tr = event.target.parentElement; var tr = event.target.parentElement;
if($(tr).attr("data-search-target").length < 1){ if($(tr).attr("data-search-target") == null || $(tr).attr("data-search-target") == ""){
var trDataset = tr.dataset; var trDataset = tr.dataset;
var byElementId = trDataset.by; var byElementId = trDataset.by;
@ -19,10 +20,10 @@ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){
document.getElementById(subOptionElementId).value = subOption; document.getElementById(subOptionElementId).value = subOption;
} else { } else {
let byEl = $($(tr).attr("data-search-target")).find("[name='by']"); let byEl = $($(tr).attr("data-search-target")).find("[name='by']")[0];
let byOutputEl = $($(tr).attr("data-search-target")).find("[name='byOutput']"); let byOutputEl = $($(tr).attr("data-search-target")).find("[name='byOutput']")[0];
let mainOptionEl = $($(tr).attr("data-search-target")).find("[name='mainOption']"); let mainOptionEl = $($(tr).attr("data-search-target")).find("[name='mainOption']")[0];
let subOptionEl = $($(tr).attr("data-search-target")).find("[name='subOption']"); let subOptionEl = $($(tr).attr("data-search-target")).find("[name='subOption']")[0];
byEl.value = snakeToCamel(byValue); byEl.value = snakeToCamel(byValue);
byOutputEl.value = byOutputValue; byOutputEl.value = byOutputValue;

Loading…
Cancel
Save