首页 > 解决方案 > Selected dropdown values copied to another textbox and click on textbox

问题描述

Trying to filter datatable columns with dropdowns, but unable to filter records. So trying for workaround like If select dropdown value, will copied the selected value in immediate textbox and trying to click on that textbox(filter with textbox is working but not working with select boxes and this text box should be on hidden mode). I'm able to copied data to the textbox but unable to click on that textbox. Please help me(Trying this solution just workaround)

$('#test1').on("change", function(e) {
      var txtVal = $(this).val();
      $('#test2').val(txtVal);
      setTimeout(function(){ $("#test2").on('click', function(){$('#test2').trigger("focus");});}, 
      100);      
});

Filters

Demo

标签: jquerydatatablesangular-datatables

解决方案


推荐阅读