reload page without losing Filter

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

reload page without losing Filter

Post by mcvaidas » 2023-02-08 08:12

is possible to reload table not full refresh? how can i save last filter options? location.reload() clears all filters and as result i have full table

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: reload page without losing Filter

Post by D Oliveira » 2023-02-08 14:07

if you want dynamic control with JS:

Code: Select all

$j(function(){
    setInterval(function(){
        $j('table').parent().load('tablename_view.php?SortField=5&SortDirection=desc table', function(){
        	// do something after reloading the table view
        });
    }, 10000);
})
https://bigprof.com/appgini/help/advanc ... parameters

mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

Re: reload page without losing Filter

Post by mcvaidas » 2023-02-08 14:43

Thank you, but this is simple part of table refresh with sortField but still Lose my selected filter (search plugin)
D Oliveira wrote:
2023-02-08 14:07
if you want dynamic control with JS:

Code: Select all

$j(function(){
    setInterval(function(){
        $j('table').parent().load('tablename_view.php?SortField=5&SortDirection=desc table', function(){
        	// do something after reloading the table view
        });
    }, 10000);
})
https://bigprof.com/appgini/help/advanc ... parameters

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: reload page without losing Filter

Post by D Oliveira » 2023-02-08 15:53

you'd have to save filters on cookies with localStorage on filter page and check those cookies on your table-tv.js file to execute the .load()

Post Reply