Skip to content

Commit

Permalink
fix(selection): Remove focus rows styles.
Browse files Browse the repository at this point in the history
Focus row behavior from selection feature needs to be updated in order to prevent conflict.

fix #6782
  • Loading branch information
Portugal, Marcelo authored and mportuga committed Jul 4, 2018
1 parent 588c868 commit a8480a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
19 changes: 5 additions & 14 deletions src/features/selection/js/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@
</file>
</example>
*/
module.directive('uiGridSelection', ['uiGridSelectionConstants', 'uiGridSelectionService', '$templateCache', 'uiGridConstants',
function (uiGridSelectionConstants, uiGridSelectionService, $templateCache, uiGridConstants) {
module.directive('uiGridSelection', ['uiGridSelectionConstants', 'uiGridSelectionService', 'uiGridConstants',
function (uiGridSelectionConstants, uiGridSelectionService, uiGridConstants) {
return {
replace: true,
priority: 0,
Expand Down Expand Up @@ -907,8 +907,8 @@
* @description Stacks on top of ui.grid.uiGridCell to provide selection feature
*/
module.directive('uiGridCell',
['$compile', 'uiGridConstants', 'uiGridSelectionConstants', 'gridUtil', '$parse', 'uiGridSelectionService',
function ($compile, uiGridConstants, uiGridSelectionConstants, gridUtil, $parse, uiGridSelectionService) {
['uiGridConstants', 'uiGridSelectionService',
function (uiGridConstants, uiGridSelectionService) {
return {
priority: -200, // run after default uiGridCell directive
restrict: 'A',
Expand All @@ -934,18 +934,9 @@
$scope.grid.options.noUnselect);
$scope.$apply();
}

// uiGridCellNavService.scrollToIfNecessary(uiGridCtrl.grid, rowCol.row, rowCol.col);
});
}

// $elm.bind('keydown', function (evt) {
// if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
// uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
// $scope.$apply();
// }
// });

var selectCells = function (evt) {
// if you click on expandable icon doesn't trigger selection
if (evt.target.className === "ui-grid-icon-minus-squared" || evt.target.className === "ui-grid-icon-plus-squared") {
Expand Down Expand Up @@ -1042,7 +1033,7 @@
};
}]);

module.directive('uiGridGridFooter', ['$compile', 'uiGridConstants', 'gridUtil', function ($compile, uiGridConstants, gridUtil) {
module.directive('uiGridGridFooter', ['$compile', 'gridUtil', function ($compile, gridUtil) {
return {
restrict: 'EA',
replace: true,
Expand Down
3 changes: 1 addition & 2 deletions src/features/selection/less/selection.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import '../../../less/variables';

.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell,
.ui-grid-row.ui-grid-row-focused > [ui-grid-row] > .ui-grid-cell {
.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell {
background-color: @rowSelected;
}

Expand Down

0 comments on commit a8480a2

Please sign in to comment.