fredguile / ng2-md-datatable

Angular 5+ DataTable component for using with Material Design 2
https://www.npmjs.com/package/ng2-md-datatable
MIT License
38 stars 13 forks source link

If can drag the scroll column width ? #39

Open ghost opened 7 years ago

ghost commented 7 years ago

I want to drag the scroll column width? how?

Hope to have some online Demo better experience this Component , Like this component ❤️

fredguile commented 7 years ago

Hey, many thanks! That's a good question, it sounds actually challenging. I'd like to focus first on a fix for mobile rendering, but that's definitely something that could be tackled in a near future.

How? We could set a "draggable" boolean input property on MdDataTableHeaderComponent to enable the feature. And a dynamic "width" property on MdDataTableColumnComponent that renders a style attribute. The drag'n'drop would be handled by a nifty-but-easy RxJS chain. During the drag we would make sure to pause Angular's change detection by using NgZone.

Who's up for the challenge?