Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Pentaho 6.1-在字段中搜索时如何显示可能结果的下拉列表?_Javascript_Jquery_Pentaho_Pentaho Cde_Pentaho Ctools - Fatal编程技术网

Javascript Pentaho 6.1-在字段中搜索时如何显示可能结果的下拉列表?

Javascript Pentaho 6.1-在字段中搜索时如何显示可能结果的下拉列表?,javascript,jquery,pentaho,pentaho-cde,pentaho-ctools,Javascript,Jquery,Pentaho,Pentaho Cde,Pentaho Ctools,我有两个字段用于查找值​​显示在表的第一列和第四列中。我想显示一个可能值的下拉列表​​从我写的文本开始 如何在表组件的后期执行中更改下面的javascript函数来实现这一点 function f() { $(document).ready(function () { // Setup - add a text input to each footer cell var arrayColumns = ['ID', 'Type']; $('

我有两个字段用于查找值​​显示在表的第一列和第四列中。我想显示一个可能值的下拉列表​​从我写的文本开始

如何在表组件的后期执行中更改下面的javascript函数来实现这一点

function f() {
    $(document).ready(function () {
        // Setup - add a text input to each footer cell
        var arrayColumns = ['ID', 'Type'];

        $('#example thead th').each(function () {
            var testo = $('#example thead th').eq($(this).index()).html();
            var title = $('#example thead th').eq($(this).index()).text();
            if (arrayColumns.indexOf(title) > -1) {
                $(this).html(testo + '<br><input type="text" placeholder="Search ' + title + '">');
            }
        });

        // DataTable
        var table = $('#example').DataTable();

        // Apply the search.
        table.columns().eq(0).each(function (colIdx) {
            $('input', table.column(colIdx).header()).on('keyup change clear', function () {
                table
                    .column(colIdx)
                    .search(this.value)
                    .draw();
            });
            // If you click in the field, it doesn't sort the results in the column in ascending/descending order.
            $('input', table.column(colIdx).header()).on('click', function (e) {
                e.stopPropagation();
            });
        });
    });
}
函数f(){
$(文档).ready(函数(){
//设置-向每个页脚单元格添加文本输入
var arrayColumns=['ID','Type'];
$('#示例thead th')。每个(函数(){
var testo=$('#示例thead th').eq($(this.index()).html();
var title=$('#示例thead th').eq($(this.index()).text();
if(数组列索引(标题)>-1){
$(this.html(testo+'
'); } }); //数据表 变量表=$(“#示例”).DataTable(); //应用搜索。 table.columns().eq(0).each(函数(colIdx){ $('input',table.column(colIdx).header()).on('keyup change clear',function(){ 桌子 .列(colIdx) .search(此.value) .draw(); }); //如果在字段中单击,则不会按升序/降序对列中的结果进行排序。 $('input',table.column(colIdx).header())。on('click',函数(e){ e、 停止传播(); }); }); }); }