• Resolved mikeprince

    (@mikeprince)


    It looks like column filters require the column to be searchable. If it isn’t they return no results. I don’t see why this has to be the case.

    On my example page to demonstrate this, I have made the Status column not searchable using "columnDefs": [ { "searchable": false, "targets": [ 4 ] } ] The similar column IUCN is searchable. The dropdown column filter on Status does not work, but IUCN does.

    The problem with it being searchable comes from the actual search field. If I search for the string ‘lc’ for example, it is actually found many times in the IUCN column and therefore confuses the results.

    Logically column filters should not need to be searchable: it is a valid use case to be able to use a dropdown filter but not a text search on the same column.

    Am I missing something here?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    From what I know, the ColumnFilterWidgets basically use the DataTables Search API functions, for finding the dropdown values, but also then only show those that were selected.
    You are totally right in that there are use cases where other behavior might be desirable, but unfortunately, I have no idea how to change this, as this indeed comes from DataTables this time. Sorry.

    Regards,
    Tobias

    Thread Starter mikeprince

    (@mikeprince)

    Ah yes, so it seems. I found an old unanswered question about it: https://datatables.net/forums/discussion/39923/column-not-searchable-but-filterable!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, this seems to be the same thing.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Columnfilter requires column to be searchable: why?’ is closed to new replies.