-
Notifications
You must be signed in to change notification settings - Fork 105
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
(Proposal) UI Grid Filters #492
Labels
Comments
After some discussion, I'm updating my recommendation for the data model. I propose: var filters = [
{ field : 'first_name', displayName: 'FORM.LABELS.FIRST_NAME', value: undefined },
// more filters
]; Advantages:
|
jniles
referenced
this issue
in jniles/bhima
Jun 17, 2016
This commit improves the filters ui again by introducing the following upgrades: 1. The server uses `moment` to parse dates in the date filters. The code on the server for rendering the filters is very similar to the clientside codebase, which is unavoidable. There might be an optimisation down the road to reduce this replication, but I think this is acceptable for now. 2. The filters are now passed into the filter form and preset there. That way, when you go to filter a second time, all the data is preserved. 3. A weird bug with caching filters was fixed. The detailed flag no longer shows up as a potential filter, and refreshing the page after printing no longer breaks the browser. 4. The date rendering has been improved in the handlebar's date helper function. If an invalid date occurs, it will simply render the empty string. 5. The `$uibModal` handler now implements the behavior described in #506. Closes #492. Closes #336.
jniles
referenced
this issue
in jniles/bhima
Jun 21, 2016
This commit improves the filters ui again by introducing the following upgrades: 1. The server uses `moment` to parse dates in the date filters. The code on the server for rendering the filters is very similar to the clientside codebase, which is unavoidable. There might be an optimisation down the road to reduce this replication, but I think this is acceptable for now. 2. The filters are now passed into the filter form and preset there. That way, when you go to filter a second time, all the data is preserved. 3. A weird bug with caching filters was fixed. The detailed flag no longer shows up as a potential filter, and refreshing the page after printing no longer breaks the browser. 4. The date rendering has been improved in the handlebar's date helper function. If an invalid date occurs, it will simply render the empty string. 5. The `$uibModal` handler now implements the behavior described in #506. Closes #492. Closes #336.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current filtering of UI Grids is bulky and difficult to work with. Some problems with it:
Proposal
I propose that we model filters as a JSON object with
column:value
pairs. Like this:I also propose that we implement add/remove functionality that can remove or add a single filter at a time. The UI would look like this:
Fig 1: No filters applied.
Fig 2: Filtering with a single filter + limit.
Fig 3: Filtering with multiple, additive filters.
When the user clicks the "X" icon on a filter, it is removed, and the data is refreshed from the database.
The text was updated successfully, but these errors were encountered: