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

Added "columnsFilters" feature #4108

Closed
wants to merge 2 commits into from

Conversation

biksteam
Copy link

@biksteam biksteam commented Aug 3, 2015

Columns filters is a feature that enables the user to add a filter
button to the column header. This button opens a popup with a filter
form.
This extends the regular filtering by ui-grid by enabling an "or" logic
to filter by.

@swalters
Copy link
Contributor

@Webiks I just noticed all of the ddescribe and iit in the tests.

@JLLeitschuh
Copy link
Contributor

Good catch @swalters

@biksteam biksteam force-pushed the columnsFilters branch 2 times, most recently from e113bde to f8a0427 Compare August 29, 2015 13:34
@biksteam
Copy link
Author

Sorry about that. It's now updated with the new version - I've also added some API and more unit tests.

@biksteam biksteam force-pushed the columnsFilters branch 3 times, most recently from 4ddc10d to 7fbcecd Compare August 29, 2015 13:54
@biksteam biksteam force-pushed the columnsFilters branch 4 times, most recently from d9bba45 to af11428 Compare August 29, 2015 19:44
<br>
<br>
<button id='toggleFiltering' ng-click="toggleFiltering()" class="btn btn-success">Toggle Filtering</button>
<div id="grid1" ui-grid-columns-filters-directive ui-grid="gridOptions" class="grid"></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ui-grid-columns-filters-directive This isn't the naming convention we follow for directive names on our features.

Columns filters is a feature that enables the user to add a filter
button to the column header. This button opens a popup with a filter
form.
This extends the regular filtering by ui-grid by enabling an "or" logic
to filter by.

Fixed a bug with service.clear

The clear function would have thrown an error when clearing a non array
filter.term property.

Added "dynamic selectOptions"

Now also clears predefined filters

Fixed the dynamic select change

Added feature tutorial

Change directive name to fit convention

uiGridColumnsFiltersDirective -> uiGridColumnsFilters

require uiGrid in the uiGridFilter directive

Changed css class

.dtl -> ui-grid-date-time-picker

Name conventions to files and folder of the columnsFilters feature

And added bootstrap to the .less file

Another commit

Another commit

Remove old folder

Added angualr merge fallback

Recursive "extend" for angular < 1.4

Fixed the unit tests for columnsFilters
@YonatanKra
Copy link
Contributor

Live example: http://plnkr.co/edit/jyTAAb3jzzj0D3C439db?p=preview (there's an issue with ttf/woff files on plnkr but aside from that, the feature works). I'm certain I haven't got everything right, but this is a great alpha for this powerful feature and comments/requests would be very much appreciated.
The motivation was this: http://demos.telerik.com/kendo-ui/grid/filter-menu-customization

@AgDude
Copy link
Contributor

AgDude commented Jan 14, 2016

I just took a quick look at the plunker, I haven't reviewed the source. There are a few UI things that should be updated to match the styling of the rest of the grid, and it should automatically filter as you type to more closely match the functionality of the default filtering.

In light of our recent conversations about moving features to separate repos, I really think this is a stand-alone plugin and doesn't belong in the core repository.

@YonatanKra
Copy link
Contributor

Thanks. I didn't do the automatic filter by design. Since it is planed with a "filter" button in its UI, the user would expect the filter to work only when clicking the filter (at least, that what my end user wants).
Even though, It can be easily done, but this can be an added feature (and I don't know if it is one of the most important of them).
Regarding design - what exactly did you have in mind?
And finally - I've made a thorough re-read of the developer guide and it states there: fork, change, PR. Did I miss anything?

@AgDude
Copy link
Contributor

AgDude commented Jan 14, 2016

@yccteam I apologize that we didn't update the contributing guidelines earlier. I have just done so, in #4767, which is pending a proof-read.

This looks like a great feature, thanks for the time you put into it. We would love to see it maintained as a plugin. Here are a few other plugins http://ui-grid.info/docs/#/tutorial/299_third_party_features. The policy we decided on at one of our recent team meetings is "if it can be a plugin, it should be", and this looks like a great candidate for a plugin.

The core team has limited time, and we are really struggling to keep up with issues as it is, as we add more features, it is more for us to maintain. One of our goals for 3.1 is to move many of the existing features into separate repositories to be offered as plugins.

I am closing this PR, please don't take it personally. We appreciate your contributions to ui-grid.

@AgDude AgDude closed this Jan 14, 2016
@YonatanKra
Copy link
Contributor

I completely understand. So... is there a guide on how to do it? Or do I just create a repo, add bower to it, and send you the details? Any guidelines for using .less/external HTML files etc.?

@swalters
Copy link
Contributor

guide is here: http://brianhann.com/write-your-own-ui-grid-plugin/

I don't know why this isn't showing on the developer.md markup. it's in the raw file.

BTW, I will be using your feature internally in the future so maybe I can help with some PR's.

@specter01wj
Copy link

specter01wj commented Sep 14, 2017

@biksteam hi, columnsFilters feature is not available in 4.0 version. Is there any replacement for this feature?
Thanks!

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

Successfully merging this pull request may close these issues.

6 participants