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

Default Filter(s) #502

Open
siripravi opened this issue May 23, 2020 · 10 comments
Open

Default Filter(s) #502

siripravi opened this issue May 23, 2020 · 10 comments
Assignees

Comments

@siripravi
Copy link

What steps will reproduce the problem?

I have defined these filters in my NgModel:
public function ngRestFilters() { return [ 'Deleted' => self::find()->where(['=', 'is_deleted', 1]), 'Active' => self::find()->where(['=', 'is_deleted', 0]), ]; }

What is the expected result?

I want to show 'Active' Items by default.
Is it possible to set some filter as default?

What do you get instead? (A Screenshot can help us a lot!)

LUYA Check ouput (run this script and post the result: luyacheck.php)

Additional infos

Q A
LUYA Version
PHP Version
Platform Apache/XAMPP/MAMPP/etc.
Operating system Windows/Linux Server/OSX/etc.
@nadar
Copy link
Member

nadar commented May 23, 2020

Its not possible, but if you have selected a filter, it will be stored in the user settings and will be the default filter for your account. does that help?

@siripravi
Copy link
Author

Sure. It would be helpful. Is it automatic? How to do it? Any documentation on this?

@nadar
Copy link
Member

nadar commented May 25, 2020

Its not available yet, but we can add this feature 👍 should not be to hard to develop.

@nadar nadar self-assigned this May 25, 2020
@siripravi
Copy link
Author

Its not filter on just one single field. We should be able to have something called a 'Filter Group', that should hold a set of filters(with search criteria) on several fields.
The user should be able to use(apply) one or more of these filter groups to the list view. Possibly we can show these filter groups as a dropdown list or a button group etc.

@nadar
Copy link
Member

nadar commented May 25, 2020

but this is not the topic you mentioned in the start of the issue?

@siripravi
Copy link
Author

Yes. What I mentioned was an enhancement to the previous requirement. I first talked about default filter criteria on one field only.

@nadar
Copy link
Member

nadar commented May 25, 2020

Well, filters can have as much criterias as you like, its a where condition. But maybe you like to use Tags, then you can also filter by tags.

@siripravi
Copy link
Author

Exactly. I dont know how feasible this requirement is, but would be helpful.

@siripravi
Copy link
Author

Sure.

@nadar
Copy link
Member

nadar commented Oct 21, 2020

@siripravi You can already use tags to filter data, just add the TaggableTrait trait and TaggableActiveWindow and you are done.

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