Skip to content

Commit e3bf316

Browse files
authored
Merge pull request swimlane#521 from smoke/fix-resize-handle-overlaped-by-label
Fix resize handle overlaped by label
2 parents 4bc34a8 + 0e79aba commit e3bf316

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/datatable.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
top: 0;
158158
bottom: 0;
159159
width: 5px;
160-
padding: 0 8px;
160+
padding: 0 4px;
161161
visibility: hidden;
162162
cursor: ew-resize;
163163
}

src/directives/resizeable.directive.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {
2-
Directive, ElementRef, HostListener, Input, Output, EventEmitter, OnDestroy
2+
Directive, ElementRef, HostListener, Input, Output, EventEmitter, OnDestroy, AfterViewInit
33
} from '@angular/core';
44
import { Observable } from 'rxjs/Observable';
55
import { Subscription } from 'rxjs/Subscription';
@@ -12,7 +12,7 @@ import "rxjs/add/operator/takeUntil";
1212
'[class.resizeable]': 'resizeEnabled'
1313
}
1414
})
15-
export class ResizeableDirective implements OnDestroy {
15+
export class ResizeableDirective implements OnDestroy, AfterViewInit {
1616

1717
@Input() resizeEnabled: boolean = true;
1818
@Input() minWidth: number;
@@ -26,7 +26,9 @@ export class ResizeableDirective implements OnDestroy {
2626

2727
constructor(element: ElementRef) {
2828
this.element = element.nativeElement;
29+
}
2930

31+
ngAfterViewInit(): void {
3032
if (this.resizeEnabled) {
3133
const node = document.createElement('span');
3234
node.classList.add('resize-handle');

0 commit comments

Comments
 (0)