Closed bdunsmuir closed 9 years ago
You can use the append_data_to_table_data for that
Daniel, it doesn't appear to be working for me. I am only getting the values I put in the data array. Here is my code:
{column_number : hold_index,
select_type:'select2',
filter_type: "multi_select_custom_func",
filter_match_mode: 'exact',
custom_func: hold_code_filters,
data: [
{value: 'Exclude On Hold', label: 'Exclude On Hold'},
{value: 'On Hold Only', label: 'On Hold Only'},
],
append_data_to_table_data: true,
filter_default_label:'All'
},
Are you using the latest beta version? if yes, please provide a jsbin / jsfiddle
Is there an existing jsfiddle I can edit? I couldn't post all of what I have and I'm not really sure how to setup a jsfiddle with all of the required files.
I am using the new beta version. The new custom_func() is working well with rowValues
Not sure what I'm doing wrong here, but I can't get a jsbin to work at all. Maybe select2 is not available in jsbin. I'm a novice programmer.
added fix to yadcf so grab the latest beta version and fixed your example
Still can't get it to work. I tried copying everything directly to my code and no luck. I made sure I am using the newest beta version. I am using ajax to populate my table, not sure if that makes a difference.
Everything else works and I get no error messages in the console. I assume it is just not seeing any existing values in my columns?
Since it does work fine in the jsbin, I wont be able to help you more without a live sample with your issue
I've managed to make a live example that shows the problem. I think it must be something to do with the ajax.
I had to email you the ajax file as I wasn't sure how to host it on jsbin. Here is the JSBIN http://jsbin.com/weluwewafu/1/edit?html,js,output
I am getting a jquery error. Try this jsbin, I think I have correctly linked to the new beta release. http://jsbin.com/gikulu/1/edit?html,js,console,output
Also, is it possible to use the sort options to put the grouped selections at the top of the list? Like prepend them instead of append them?
I know this is a real PITA, but thank you for such a great plugin.
it will take me some time to fix it properly for ajax too... I'll update this issue when I'll finish this one
should work now, try the latest beta...
It is working now, thank you very much!
I tried using sort_order with this but it doesn't do anything. Will it be possible to select a sort order with this, or put the grouped selections at the top of the list? Would you prefer I open another ticket for that?
Once again, thank you for the work on this.
No need for new issue, I'll abuse this one...
updated, read updated docs if you want to add your data array before on top of the select use before
, if you want it to appear sorted then at least for now you shouldn't use array with value/label but use an array of strings. for sorting array with value/label you should open a new issue and know that it will take some time to be added...
This works great, thank you .
I'm having issues where I can get the myCustomFilterFunction cases working, but when trying to select any of the populated values in that column, it doesn't filter and displays all rows. Also when selecting multiple myCustomFilterFunction cases or a myCustomFilterFunction case and a populated value, I get no rows returned.
Used code from here https://stackoverflow.com/questions/34089173/yadcf-apply-and-filterring-to-multiple-selections-from-a-json-array
If you use the multi_select_custom_func to make a custom filter selector, the selection list is no longer populated with all the possible values for that column.
It would be nice to add a custom filter to the list, but still have the list populate with all the other possible values.