Skip to content

Commit 0885e50

Browse files
committed
fix(RTL): Put filter cancel on left for RTL
Filter cancel button was on the right in RTL grids, overlaying text. Fixes #2058
1 parent 1aa6727 commit 0885e50

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/less/header.less

+12-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
bottom: 0;
144144
right: 0;
145145

146-
[class^="ui-grid-icon"].right {
146+
[class^="ui-grid-icon"] {
147147
position: absolute;
148148
top: 50%;
149149
line-height: 32px;
@@ -158,6 +158,17 @@
158158
}
159159
}
160160

161+
// Position filter-cancel button on the left for rtl grids
162+
.ui-grid[dir="rtl"] .ui-grid-filter-container .ui-grid-filter-button {
163+
right: initial;
164+
left: 0;
165+
166+
[class^="ui-grid-icon"].right {
167+
right: initial;
168+
left: 10px;
169+
}
170+
}
171+
161172
input[type="text"].ui-grid-filter-input {
162173
padding: 0;
163174
margin: 0;

src/templates/ui-grid/uiGridHeaderCell.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<input type="text" class="ui-grid-filter-input" ng-model="colFilter.term" ng-click="$event.stopPropagation()" ng-attr-placeholder="{{colFilter.placeholder || ''}}" />
1717

1818
<div class="ui-grid-filter-button" ng-click="colFilter.term = null">
19-
<i class="ui-grid-icon-cancel right" ng-show="!!colFilter.term">&nbsp;</i> <!-- use !! because angular interprets 'f' as false -->
19+
<i class="ui-grid-icon-cancel" ng-show="!!colFilter.term">&nbsp;</i> <!-- use !! because angular interprets 'f' as false -->
2020
</div>
2121
</div>
2222
</div>

0 commit comments

Comments
 (0)