Skip to content

Conversation

@sanjaynishad
Copy link

Added the new feature to ui-grid for multi-select filter, it's inspired from the example http://ui-grid.info/docs/#/tutorial/306_custom_filters

already added new repo--> https://github.com/sanjaynishad/ui-grid-multiselect-filter
demo -->http://www.sanjaynishad.com/ui-grid-multiselect-filter/
Thanks..:)

@dlgski
Copy link
Contributor

dlgski commented Nov 7, 2016

@sanjaynishad can you please fix this PR so it passes integration? Thank you

@sanjaynishad
Copy link
Author

Sure, please give me some time. Thanks

@sanjaynishad
Copy link
Author

@dlgski fixed the PR, Thank You.. :)

}

.ui-grid-multi-select-filter .footer {

Copy link
Contributor

Choose a reason for hiding this comment

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

remove ?

Copy link
Author

@sanjaynishad sanjaynishad Nov 19, 2016

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,99 @@
if (!Element.prototype.matches) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be contained w/in an closure. Also needs 'use strict'

Copy link
Contributor

Choose a reason for hiding this comment

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

why do you have all this code outside of the module?

Copy link
Author

Choose a reason for hiding this comment

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

done

if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector;
}
if (!Element.prototype.closest) {
Copy link
Contributor

Choose a reason for hiding this comment

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

have you looked at gridUtil ?

Copy link
Author

Choose a reason for hiding this comment

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

I have added these code for IE, btw no need to keep this. removed the same

@franbenz
Copy link

Hi @dlgski, any tips on next steps for this PR?

@mportuga
Copy link
Member

@sanjaynishad and @franbenz Can you please add unit tests to your feature?

@mportuga
Copy link
Member

If I see no response in 4 days or so, I will be declining this PR for now.

@sanjaynishad
Copy link
Author

@mportuga I'm not getting time to work on unit test.
can someone please create? otherwise I'll do once I'll free.

@mportuga
Copy link
Member

I might try if I get some time, but for now, this will just have to stay open.

@pradapkumar
Copy link

pradapkumar commented Feb 9, 2017

Hi Sanjay
I tried adding your multi-select filter to the grid. when I click "..." button below the column name first time its shows me the pop up and allow me to filter and the grid gets filtered but when I click the same button (...) again second time I getting error and the pop up is not coming up

below is the error

Error: [$compile:ctreq] http://errors.angularjs.org/1.4.8/$compile/ctreq?p0=uiGrid&p1=uiGridHeaderCell
at p (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:59:407)
at p (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:59:475)
at D (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:62:1)
at g (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:55:105)
at Anonymous function (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:54:249)
at Anonymous function (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:56:72)
at k (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:60:370)
at Anonymous function (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:281:253)
at Anonymous function (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:130:77)
at r.prototype.$digest (http://ff01faf5b908e.corp.bankofamerica.com:8080/Scripts/angular.min.js:131:147)

I have added the gridoption

$scope.gridOptions = {
enableSorting: true,
paginationPageSizes: [25, 50, 75],
paginationPageSize: 25,
enablePaginationControls: false,
enableGridMenu: false,
gridMenuShowHideColumns: false,
exporterMenuPdf: false,
enableRowHeaderSelection: false,
enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
enableRowSelection: true,
enableColumnMenus: false,
enableFiltering: true,
columnDefs: $scope.columns,
showGridFooter: true,

}; 

and header template as below.
field: fieldName, displayName: fieldName, width: currentFieldWidth,
filterHeaderTemplate: '

', enableCellEdit: grdFieldisEditable

Please let me know what mistake I have done.

Thanks

@sanjaynishad
Copy link
Author

Hi @pradapkumar ,
Sorry, I'm not able to reproduce this issue, it works fine for me. I'll check again one get time.
Thanks.

@dlgski
Copy link
Contributor

dlgski commented Mar 3, 2017

I cannot merge feature updates without unit tests. Is this PR still necessary?

@sanjaynishad
Copy link
Author

Will add unit test

@mportuga
Copy link
Member

mportuga commented Jun 6, 2017

@sanjaynishad Any progress on unit tests?

@sanjaynishad
Copy link
Author

@mportuga I didn't get time.
@dlgski if no one is going to add unit test, you may close this PR

@mportuga
Copy link
Member

Closing due to lack of tests.

@mportuga mportuga closed this Jun 14, 2017
@pradapkumar
Copy link

@sanjaynishad no prb thanks 😊

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