Skip to content

Commit a8480a2

Browse files
Portugal, Marcelomportuga
Portugal, Marcelo
authored andcommitted
fix(selection): Remove focus rows styles.
Focus row behavior from selection feature needs to be updated in order to prevent conflict. fix #6782
1 parent 588c868 commit a8480a2

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

src/features/selection/js/selection.js

+5-14
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,8 @@
710710
</file>
711711
</example>
712712
*/
713-
module.directive('uiGridSelection', ['uiGridSelectionConstants', 'uiGridSelectionService', '$templateCache', 'uiGridConstants',
714-
function (uiGridSelectionConstants, uiGridSelectionService, $templateCache, uiGridConstants) {
713+
module.directive('uiGridSelection', ['uiGridSelectionConstants', 'uiGridSelectionService', 'uiGridConstants',
714+
function (uiGridSelectionConstants, uiGridSelectionService, uiGridConstants) {
715715
return {
716716
replace: true,
717717
priority: 0,
@@ -907,8 +907,8 @@
907907
* @description Stacks on top of ui.grid.uiGridCell to provide selection feature
908908
*/
909909
module.directive('uiGridCell',
910-
['$compile', 'uiGridConstants', 'uiGridSelectionConstants', 'gridUtil', '$parse', 'uiGridSelectionService',
911-
function ($compile, uiGridConstants, uiGridSelectionConstants, gridUtil, $parse, uiGridSelectionService) {
910+
['uiGridConstants', 'uiGridSelectionService',
911+
function (uiGridConstants, uiGridSelectionService) {
912912
return {
913913
priority: -200, // run after default uiGridCell directive
914914
restrict: 'A',
@@ -934,18 +934,9 @@
934934
$scope.grid.options.noUnselect);
935935
$scope.$apply();
936936
}
937-
938-
// uiGridCellNavService.scrollToIfNecessary(uiGridCtrl.grid, rowCol.row, rowCol.col);
939937
});
940938
}
941939

942-
// $elm.bind('keydown', function (evt) {
943-
// if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
944-
// uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
945-
// $scope.$apply();
946-
// }
947-
// });
948-
949940
var selectCells = function (evt) {
950941
// if you click on expandable icon doesn't trigger selection
951942
if (evt.target.className === "ui-grid-icon-minus-squared" || evt.target.className === "ui-grid-icon-plus-squared") {
@@ -1042,7 +1033,7 @@
10421033
};
10431034
}]);
10441035

1045-
module.directive('uiGridGridFooter', ['$compile', 'uiGridConstants', 'gridUtil', function ($compile, uiGridConstants, gridUtil) {
1036+
module.directive('uiGridGridFooter', ['$compile', 'gridUtil', function ($compile, gridUtil) {
10461037
return {
10471038
restrict: 'EA',
10481039
replace: true,

src/features/selection/less/selection.less

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import '../../../less/variables';
22

3-
.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell,
4-
.ui-grid-row.ui-grid-row-focused > [ui-grid-row] > .ui-grid-cell {
3+
.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell {
54
background-color: @rowSelected;
65
}
76

0 commit comments

Comments
 (0)