Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'filter_match_mode' of undefined #49

Closed
WS-Trends opened this issue May 27, 2014 · 5 comments
Closed

Cannot read property 'filter_match_mode' of undefined #49

WS-Trends opened this issue May 27, 2014 · 5 comments
Labels

Comments

@WS-Trends
Copy link

Hi,

I set up a yadcf extension for my datatable, rendering of initial table works fine, but when I want to filter something (text filter), I get this error message

TypeError: Cannot read property 'filter_match_mode' of undefined

Extra table settings:
bStateSave: false,
bAutoWidth: false,
bSort: true,
bServerSide: true,
bProcessing: true,
bDestroy: true,

Anyone knows how to fix or if thats a yadcf bug?

Thanks

@vedmack
Copy link
Owner

vedmack commented May 27, 2014

Hi,
Are you using the latest version? (0.7.0 currently) , also please provide more info , Yadcf and Datatables init code snippet / line number of the error / etc

@WS-Trends
Copy link
Author

Hi,

I use latest 0.7.0, its actually first use of this plugin so very simple test use,

code
http://pastebin.com/brbyaNRR

I can see the table, list through pages, but when I type something to filter field, I get:

Uncaught TypeError: Cannot read property 'filter_match_mode' of undefined, jquery.dataTables.yadcf.js:1584

Thats this:
yadcfMatchFilter(oTable, event.target.value, options.filter_match_mode, column_number);

If you need more info, let me know!

@vedmack
Copy link
Owner

vedmack commented May 28, 2014

Well... a Year has passed since the first Yadcf release, I postponed the server side support for Yadcf all this time and was a bit lazy to setup server side on my localhost, and today, finally I did one (thanks to this bug) , long story short, I managed to reproduce this bug and hopefully fix it in the next days,
A side of the written above, I noticed that you hide your second column (index 1) and you asked from Yadcf to add a text filter for this hidden column <-- its wrong , because that column is hidden, if you want to filter hidden column you should place that filter outside of the column with the help of the

filter_container_id (read in docs/see the showcase).

And yes I just found another bug thanks to your issue : setting filter for hidden column (without using the filter_container_id) will place it on the next column in the table (index i+1 where the i index is hidden)

@WS-Trends
Copy link
Author

Hi,

Im very glad to hear that you were actually able to reproduce this bug! Setting a filter for hidden column is indeed wrong, but it works - and it will not, when you fix it - it was ment to filter the next column, not the hidden one, so it worked like a charm, Ill change this to correct column index to make it correct, thanks for the tip :)

Please let me know when you are ready with those fixes so I can replace with new version and try it out again.

Thank you very much!

@vedmack vedmack added the bug label May 28, 2014
vedmack added a commit that referenced this issue Jun 1, 2014
…array of objects / code optimizations / bug fix.

#45
#48
#49
@vedmack
Copy link
Owner

vedmack commented Jun 1, 2014

Fixed in 0.7.2

@vedmack vedmack closed this as completed Jun 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants