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

Filtering TableScreen vs Model for requests #909

Closed
davidmosterd opened this issue Sep 15, 2017 · 1 comment
Closed

Filtering TableScreen vs Model for requests #909

davidmosterd opened this issue Sep 15, 2017 · 1 comment

Comments

@davidmosterd
Copy link
Member

Right now the filtering model depends on an active TableScreen in order to work properly. This is a very tight coupling that might not be needed and disallows a filter model to be instantiated without a functional TableScreen.

What might be better is that each model can decide whether is being filtered or not based on the input it gets (from either a request or by a setter). In the first version, we could simply work by asking the $_GET parameters, but it would be even better to inject a Request object with the model to work with.

The methods involved now are:

get_requested_filter_values
get_requested_filter_value
get_request_var (to a lesser extend)
get_request_var_column (seems scopecreep to me, the model could do this?)

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