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

Saving other http query parameters along with filters #328

Open
kingsdeb opened this issue Sep 20, 2016 · 4 comments
Open

Saving other http query parameters along with filters #328

kingsdeb opened this issue Sep 20, 2016 · 4 comments

Comments

@kingsdeb
Copy link

kingsdeb commented Sep 20, 2016

I am currently customizing the column display by passing some query parameters in the get request. By that i am setting conditions in the grid to display column or not.

For e.g:

if @value
 g.column name: 'Name', attribute: 'name' ...
end

If value is set, will display the column.
I have many columns and i don't want to hide the columns using CSS, i just want to get the columns which are desired in every request.
I even dump the filter in the request as hidden fields.
This is working as well.
Note sure if this is the correct way to do it.

But i now want to save my other http query parameters along with the filters in the serialised query which gets created.
Can we do it ?

@leikind
Copy link
Owner

leikind commented Sep 20, 2016

This is perfectly valid way to show/hide certain columns, but I am afraid you will have to store @value separately

@kingsdeb
Copy link
Author

kingsdeb commented Sep 20, 2016

When you say "store the @value separately" , does it mean, we will have create new attributes in saved query model and pass the value using "extra_parameters" hash ?

@leikind
Copy link
Owner

leikind commented Sep 20, 2016

I am not sure, I mean you will have to find a way to deal with it outside of the plugin, in your app. If I were you I would copy the code for saved queries from the plugin to your app and modify it to your liking. I've wanted to remove this functionality away from the plugin many times, I believe it doesn't belong there,].

@kingsdeb
Copy link
Author

Okay, Thanks for the quick reply. @leikind

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