Column search not working on Raw Column?

Column search not working on Raw Column?

YesterdaYYesterdaY Posts: 1Questions: 1Answers: 0

Hi, I am trying to do a search on a raw column, but it doesn't seem working for me. Any helps will be appreciated.

For ajax

return Datatables::of($invoices)
            ->addColumn('invoice_id', function ($invoices) {
                return '<a href="/invoices/' . $invoices->invoice_external_id . '" ">' . $invoices->integration_invoice_id . '</a>';
            })
            ->rawColumns(['invoice_id'])
            ->make(true);

for front end

var table = $('#clients-table').DataTable({
                processing: true,
                serverSide: true,
                ajax: '{!! route('invoice.data') !!}',
                language: {
                    url: '{{ asset('lang/' . (in_array(\Lang::locale(), ['dk', 'en']) ? \Lang::locale() : 'en') . '/datatable.json') }}'
                },
                lengthMenu: [[25, 50 , 100, -1], [25, 50, 100, "All"]],
                pageLength: 25,
                name:'search',
                drawCallback: function(){
                    var length_select = $(".dataTables_length");
                    var select = $(".dataTables_length").find("select");
                    select.addClass("tablet__select");
                },
                autoWidth: false,
                dom: 'Blfrtip',

                buttons: [
                    'excel'
                ],
                columns: [
                    {data: 'invoice_id', name: 'invoice_id', width: '105px'},
                ]
            });

Answers

  • allanallan Posts: 63,238Questions: 1Answers: 10,418 Site admin

    I don't know what server-side library you are using them I'm afraid. It isn't one produced by us, so you'd probably need to ask the author of that library if their library supports column search.

    Allan

This discussion has been closed.