YADCF - exGetColumnFilterVal - getOptions is Undefined

YADCF - exGetColumnFilterVal - getOptions is Undefined

lyradlyrad Posts: 8Questions: 3Answers: 0
edited September 2014 in Free community support

Hi,
I'm trying to use exGetColumnFilterVal to get a YADCF input value.
I'm able to use exColumnFilter bug I got a jvs firebug error each time I try to use exGetColumnFilterVal.

Does external containers may cause the problem? Or DataTable/dataTable?

Error : yadcf.js (ligne 2165, col. 3) :
TypeError: getOptions(...) is undefined
optionsObj = getOptions(table_arg.selector)[column_number];

I'm using YADCF v0.8.3 & datatable 1.10.2..

My code, in document.ready...

var tableWallet = $('#tableWallet').DataTable({});  
//Filtrage du tableau des alarmes (DATATABLES.YADCF)
yadcf.init(tableWallet, [ {
    column_number: 1,
    filter_type: "text",
    filter_default_label: "Saisissez...",
    filter_container_id: "tableWallet_filtre_ID_ALARME"
}, {
    column_number: 5,
    filter_type: "text",
    filter_default_label: "Saisissez...",
    filter_container_id: "tableWallet_filtre_ID_ETAT_ALARME"
}, {
    column_number: 6,
    filter_type: "select",
    select_type: "select2",
    filter_default_label: "Sélectionnez...",
    data: [ <?php foreach ($this->listUO as $uo)echo '"' . $this->escape($uo) . '",'; ?> ],
    filter_default_label: "Sélectionnez...",
    filter_container_id: "tableWallet_filtre_UO"
}, {
    column_number: 7,
    filter_type: "auto_complete",
    filter_default_label: "Saisissez...",
    filter_container_id: "tableWallet_filtre_LIBELLE_LIEU_EQUIPEMENT"
}, {
    column_number: 8,
    filter_type: "select",
    select_type: "select2",
    data: [ <?php foreach ($this->listTypeEquipement as $te)echo '"' . $this->escape($te) . '",'; ?> ],
    filter_default_label: "Sélectionnez...",
    filter_container_id: "tableWallet_filtre_LIBELLE_TYPE_EQUIPEMENT"
}, {
    column_number: 9,
    filter_type: "auto_complete",
    filter_default_label: "Saisissez...",
    filter_container_id: "tableWallet_filtre_DESC_BM"
}, {
    column_number: 10,
    filter_type: "range_date",
    filter_default_label: [ "Du", "Au"],
    date_format: "dd/mm/yyyy",
    filter_container_id: "tableWallet_filtre_DATE_DETECTION",
}, {
    column_number: 11,
    filter_type: "text",
    filter_default_label: "Saisissez...",
    filter_container_id: "tableWallet_filtre_CODE"
}, {
    column_number: 12,
    filter_type: "multi_select",
    select_type: "select2",
    filter_default_label: "Sélectionnez...",
    data: [ <?php foreach ($this->listGravite as $gr)echo '"' . $this->escape($gr) . '",'; ?> ],
    filter_container_id: "tableWallet_filtre_GRAVITE"
},{
    column_number: 13,
    filter_type: "auto_complete",
    filter_default_label: "Saisissez...",
    filter_container_id: "tableWallet_filtre_LIBELLE_CATALOGUE_ALARME"
},{
    column_number: 14,
    filter_type: "text",
    filter_default_label: "",
    filter_container_id: "tableWallet_filtre_IDPORTEFEUILLE"
}]); 

yadcf.exFilterColumn( tableWallet, [ [ 11, "8017" ] ] ); //Setting the field to 8017...
console.log(yadcf.exGetColumnFilterVal(tableWallet,11)); //Firebug error!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.