SearchBuilder Conditions doesnt work after adding another condition and modifying the value of 1st

SearchBuilder Conditions doesnt work after adding another condition and modifying the value of 1st

Abdelrahman_AlnasharAbdelrahman_Alnashar Posts: 10Questions: 2Answers: 0

I tested this issue in 2 different examples and it didn't work in both.
Example: example here

In searchBuilder, when adding a condition, as the first condition, giving it a particular value, and then adding another condition also with a value, the dataTable filters according to what was specified but, if we go back to the first condition and change its value the table doesn't filter according to the value changed. *

! I am working on the server side, so the server-side processing option is set to true.

    $(document).ready( function () {
    $('#datatable').DataTable({
    dom: 'QBfrtip', 
    processing: true,
    serverSide: true,
    ajax: {
        url: '/api/web/items'
    },
    columns: [
        { data: 'id', name: 'id' },
        { data: 'name', name: 'name' },
        { data: 'description', name: 'description', sortable: false },
        { data: 'vendor', name: 'vendor', sortable: false }, 
        { data: 'price', name: 'price' },
        { data: 'category', name: 'category', visible: false }, 
        { data: 'material', name: 'material', visible: false }, 
        { data: 'unit', name: 'unit', visible: false },
    ],
    ordering: false,
    order: [[0, 'asc']],
    searchBuilder: {
        columns: [3, 4, 5, 6, 7],
        conditions: {
            string: {
                '=': null,
                '!=': null,
                'contains': null,
                'starts with': null,
                'ends with': null
            },
            num: {
                '=': null,
                '!=': null
            }
        }

    }
});
$('.dt-buttons .btn').removeClass('dt-button');

});

! I hope my issue is clear

Replies

Sign In or Register to comment.