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

Filter not working on dynamic input in Firefox but in Chrome #602

Closed
alex-seitz opened this issue Nov 14, 2019 · 7 comments
Closed

Filter not working on dynamic input in Firefox but in Chrome #602

alex-seitz opened this issue Nov 14, 2019 · 7 comments

Comments

@alex-seitz
Copy link

Hello,
I have a table with an editable cell that I update using the infalidate().draw() method. The filters get updated in both browsers but the filtering itself only works in Chrome. In Firefox I only get an empty table.

I have attached an example file where this is the case.
Here is a jFiddle: https://jsfiddle.net/alexseitz/sx9fgdw0/

This jFiddle shows that the data is present in the datatable and as I said, in Chrome the filtering works just fine.:
https://jsfiddle.net/afs68Lg7/

Additionally, is it possible to also select empty cells. The only example I found was to add the empty fields manually to the filter, which I then can't update with the dynamic content of the editable fields

Thank you in advance

Alex

@vedmack
Copy link
Owner

vedmack commented Nov 14, 2019

@alex-seitz , Hi in both test pages the filtered column is empty

@alex-seitz
Copy link
Author

alex-seitz commented Nov 14, 2019

Hi,
you enter the Values in the contentEditable Fields. Afterwards the values are updated in the DataTable and can be selected in the Filter. However, the filtering itself only works in Chrome, in Firefox the result is always an empty table

@vedmack
Copy link
Owner

vedmack commented Nov 14, 2019

Its because of the
that for some reason are being added to the inputs,

I fixed it in 0.9.4.beta.31, you should add ignore_char: '<br>' to you filter

See working jsfiddle https://jsfiddle.net/su08z3f2/1/ (js file currently on my dropbox - lin in jsfiddle)

as to "empty cells." - please elaborate more about the scenario

@alex-seitz
Copy link
Author

Thank you. It works great.
With the empty fields, I mean that I want to show only the rows where I did not add anything to the editable fields, so only the ones I left blank.
It is somewhat possible by adding the following two lines to the filter:

data: [ {value:'^$', label:'Empty' }],
filter_match_mode: 'regex'

but then the values I add to the cells no longer show up.

Best,
Alex

@vedmack
Copy link
Owner

vedmack commented Nov 14, 2019

I think you looking for append_data_to_table_data property, read more in the yadcf js file (docs)

@vedmack vedmack closed this as completed Nov 14, 2019
@vedmack
Copy link
Owner

vedmack commented Nov 14, 2019

@alex-seitz if it won't help you feel free to open a new issue with test page / scenario / expected / actual...

vedmack added a commit that referenced this issue Nov 14, 2019
#602 - Filter not working on dynamic input in Firefox but in Chrome
@alex-seitz
Copy link
Author

@vedmack It works great, thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants