swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

Cannot import ScrollbarHelper service #796

Open worudso opened 7 years ago

worudso commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior

ScrollbarHelper service is unreachable from outside. I can't import ScrollbarHelper, and it makes impossible to extend DatatableComponent because It's not possible to write constructor

class MyComponenet extends DatatableComponent {
    constructor(scrollbarHelper: ScrollbarHelper, element: ElementRef, differs: KeyValueDiffers) {
        super(scrollbarHelper, element, differs)
        ...
    }
    ...
}

Expected behavior

It should be allowed to import ScrollbarHelper. Besides, why is ScrollbarHelper implemented as a service? Should it be 'injected'? There is no way to inject ScrollbarHelper from outside, because of the same reason that I can't import ScrollbarHelper. Reproduction of the problem

What is the motivation / use case for changing the behavior?

I want to extend DatatableComponent.

Please tell us about your environment:

linux mint, atom, apt

amcdnl commented 7 years ago

Can you make a PR just to export this?

sacgrover commented 4 years ago

@worudso ScrollbarHelper is already available from outside now. @amcdnl you can close this ticket.