stwe / DatatablesBundle

This Bundle integrates the jQuery DataTables plugin into your Symfony application.
355 stars 236 forks source link

individual_filtering to associated collumns #942

Closed AlexanderMur closed 3 years ago

AlexanderMur commented 4 years ago

Is it possible apply filter without changes of values in column? Values of coulmns are also filtered when collumn is applied for filter.

$this->columnBuilder
    ->add('createdBy.username', Column::class, array(
        'title' => 'Created by',
        'width' => '100%',
        'filter' => array(Select2Filter::class,
            array(
                'search_type' => 'gt',
                'cancel_button' => true,
                'url' => 'select2_usernames',
            ),
        ),
    ))

Also you can see example in demo application. when you trying to filter "comment" collumn. For example if you type "comment 4" it will show only "comment 4" without other values. 12c3257303

Seb33300 commented 4 years ago

I don't understand your question. The purpose of the filter is to filter rows matching with the value you are searching for.

AlexanderMur commented 4 years ago

If I search "Comment 4" in another datatable library with same database it will look like this: download

But if I search "Comment 4" in sg/datatablesbundle instead of "Comment 1,Comment 2,Comment 3,Comment 4" it will show only "Comment 4" download2