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

Pre Selecting an escaped value #612

Closed
adrianmihalko opened this issue Jan 26, 2020 · 5 comments
Closed

Pre Selecting an escaped value #612

adrianmihalko opened this issue Jan 26, 2020 · 5 comments

Comments

@adrianmihalko
Copy link

I am opening here a bug report, following my question on Stackoverflow.

The problem is, that it's currently not possible to populate select input at init:

67rfcw4e0m37

it's empty, but filtering works correctly.

As found by Datatables developer on their forum , maybe there is a race condition which is causing the YADCF plugin to clear the input value.

crgutxl7f456

As you can see it shows up for a sec, then it's become hidden.

I tried multiple solution, but none seem to be work:

$('#mytable').on( 'init.dt', function () {
     yadcf.exFilterColumn(oTable, [[4, '3/2020']], true);
  } );

 yadcf.initOnDtXhrComplete(function() { 
   yadcf.exFilterColumn(oTable, [[4, $("#yadcf-filter--mytable-4 option:eq(1)").val()]], true);
  });

Test site:

init.d
yadcf.initOnDtXhrComplete

@vedmack
Copy link
Owner

vedmack commented Jan 30, 2020

@adrianmihalko please try the 0.9.4.beta.39 https://www.dropbox.com/s/g2ctbdq6zfuziy4/jquery.dataTables.yadcf.js?dl=0

update it on your site so I can see how it works for you

@adrianmihalko
Copy link
Author

@vedmack Hi Daniel, looks good:

https://bow.thingiverse.ml

thanks for your time 👍

@vedmack
Copy link
Owner

vedmack commented Jan 31, 2020

@adrianmihalko cool, can u please provide a test page for a scenario in which you try to pre-select a value that does not exist in the select, for example, 6/2020 (I want to see the flow...)?

@adrianmihalko
Copy link
Author

@vedmack vedmack changed the title Possible race condition Pre Selecting an escaped value Feb 2, 2020
vedmack added a commit that referenced this issue Feb 2, 2020
#612 - Pre Selecting an escaped value
vedmack added a commit that referenced this issue Feb 2, 2020
#612 - Pre Selecting an escaped value
@vedmack
Copy link
Owner

vedmack commented Feb 2, 2020

@adrianmihalko you can get the final 0.9.4.beta.40 js version with the fix

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

No branches or pull requests

2 participants