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 7 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

4 Answers
Abu Ghufran answered 7 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 2 years 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 years 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
 
Abu Ghufran Staff answered 2 years ago

The multiselect issue is fixed now: https://www.gridphp.com/demo/demos/integrations/multiselect-filter.php

I am still unable to generate the daterangepicker and select2 issue that you mentioned.

It would be easy if you can send me table structure of users and plants with some test data.

You can share via gist as well.

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

11 + 20 =

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?