Set YADCF filter value on initial load without using exFilterColumn

Set YADCF filter value on initial load without using exFilterColumn

GG Posts: 16Questions: 7Answers: 0

How do I set default YADCF filter value, based on user preference without using exFilterColumn.
Issue with using exFilterColumn is that is caused double AJAX load.

For eg: In our system, user has a preference that his default filter be set to airport 'DTW'
I want a way to supply default filter value, when initializing YADCF column filters.

                        "column_number": 5,
                        filter_type: "text",
                        "column_name": "Airport"

"Column_initialValue": "DTW"

How should be able to do this ???

Answers

  • owlookitowlookit Posts: 1Questions: 0Answers: 0

    Hi there,

    got the same problem. Wondering how to prevent a double AJAX load when I try to implement a pre-defined yadcf filtering for server-side DataTables.

    Thank you in advance.

    Cheers,
    Ruslan

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    In case anyone ( @allan ? ) can tell how it can be achieved in datatables (unrelated to my yadcf plugin) I will be able to help

  • allanallan Posts: 63,819Questions: 1Answers: 10,517 Site admin

    You can set default column filter values in DataTables with searchCols.

    Allan

This discussion has been closed.