Reload Grid button not reset select2 and/or daterange from inline search inputs

QuestionsReload Grid button not reset select2 and/or daterange from inline search inputs
Adrian asked 5 years ago

Hi everyone,

When I pressed the "Reload Grid" button, all inline search entries were reset except to those of type "daterange" and "select2"…
The button (Reload Grid) work properly because reload all records without filtering, but I need also to reset all search inputs.
How do I do this for "daterange" and "select2" search inputs?

Thanks,
Adrian

3 Answers
Abu Ghufran answered 5 years ago

For select2, you can set
:
$grid["loadComplete"] = "function(){ $('#gs_client_id').trigger('change'); }";
$g->set_options($grid);

Where client_id is $col["name"].

For daterangepicker, it's taking a lot of modifications and not supported now.

Bruce Rick answered 3 weeks ago

I’ve tried this in my build and it’s not working. None of my select filters are resetting in any grid. Any suggestions?

Abu Ghufran Staff answered 2 weeks ago

Hello Bruce,

Please check if there is any JS error showing in debug console (ctrl+shift+c) and share if there is.
You can also share some testing link to see this issue.

I’m unable to generate this issue and can be checked in the working demo:

https://www.gridphp.com/demo/demos/integrations/dropdown-select2.php
https://www.gridphp.com/demo/demos/integrations/multiselect-filter.php

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

18 + 10 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?