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

Unable to chain methods for configuration options #12

Open
ragingdave opened this issue Mar 13, 2021 · 0 comments
Open

Unable to chain methods for configuration options #12

ragingdave opened this issue Mar 13, 2021 · 0 comments

Comments

@ragingdave
Copy link

ragingdave commented Mar 13, 2021

Unlike the rest of nova fields, this filter allows configuration only from the constructor. This makes it difficult to modify the behavior of say an extended child class to add additional features that don't really fit. While it can be done, it's kind of ugly as you have to modify the internal config array.

Would you be open to changes that allow configuration via chainable methods instead of (or in addition to) the constructor config?

For example, instead of setting the default date range via the config constructor param, it could be called instead like:

(new DateRangeFilter())
     ->withDefaultRange('90 days ago, 'today')

That example takes it a step further and allows variable date ranging as well based on carbon parsing, but you get the idea for allowing configuration in a bit clearer way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant