Closed mrhieuit closed 4 years ago
Hi @mrhieuit,
onChange usage is below:
$(".dropdown")
.comboTree({
source: productStoreFullJson,
isMultiple: false
})
.onChange(function () {
console.log($(this).getSelectedIds());
});
Thanks for your reply, however it's not work.
jQuery(document).ready(function ($) {
comboTree1 = $('#justAnInputBox').comboTree({
source: SampleJSONData,
isMultiple: true,
cascadeSelect: false,
collapse: true
});
comboTree3 = $('#justAnInputBox1').comboTree({
source: SampleJSONData,
isMultiple: true,
cascadeSelect: true,
collapse: false
});
comboTree3.setSource(SampleJSONData2);
comboTree2 = $('#justAnotherInputBox')
.comboTree({
source: SampleJSONData,
isMultiple: false
})
.onChange(function () {
console.log($(this).getSelectedIds());
});
});
I have multi input with class "dropdown" on page. I init comboTree for all dropdown successfull with this code:
I want add a event onChange for get selected id when each dropdown change it's selected value. I use bellow codes:
However onChange event not work, please help me correct this. Thanks!