I have a fairly standard bootstrap-styled <table>
. I want to make columns of this table resizable, e.g. by click-and-dragging right border of <th>
element. I can't use any jQuery plugins as I'm using Angular and jQuery dependency is not acceptable.
I was thinking that if I could catch the click/mousemove event on the right border of <th>
element, I could implement my own resizing logic (monitor horizontal mouse movement and adjust width accordingly), but I don't know how this can be done (there is no such thing as element border-related event as far as I know).
What's the best way to make columns resizable by user? Without jQuery (and preferably - in Angular 2 context).