angular-data-table icon indicating copy to clipboard operation
angular-data-table copied to clipboard

API for manually call column resize

Open derchirurg opened this issue 9 years ago • 2 comments

I have a DataTable inside a bootstrap grid. The bootstrap grid columns change dynamically depending on the content.

The resizing of the columns of the DataTable is only triggered if the whole window is resized. The resizing is done in the DataTable Component as far as I can see.

Is there a way to manually call the resizing from code?

derchirurg avatar Oct 19 '16 12:10 derchirurg

OK I found a solution, but it's a dirty workaround. I manually trigger the resize event like this:

setTimeout(() => { window.dispatchEvent(new Event('resize')); }, 100);

But an official API call would be nice.

derchirurg avatar Oct 19 '16 13:10 derchirurg

I see, it is in the wrong project. It should be for angular2-data-table: https://github.com/swimlane/angular2-data-table

derchirurg avatar Oct 25 '16 06:10 derchirurg