Search code examples
angularangular-libraryngx-datatable

angular 11 swimlane/ngx-datatable in custom library not add the ngx-datatable class in some projects


I have created an angular custom library to easy configurate my tables projectwide.

I have crate a default config that defined in my appmodule and i have a tablespecific config in my component for special things. This allows me to keep the tables the same throughout the project and the functionalities like columnfilter, buttons etc. are always implemented the same way. The config consists of a json that could even be loaded via http. This all works great. I have already used this library in several projects. But now i have encountered a problem with another project. When a ngx-datatable is built, it automatically sets the css class ngx-datatable. Only in this one project it doesn't. But when i create a ngx-datatable without my library it works fine. I've been trying to figure out what the problem is for several days now, but with no luck. There are no error messages at all. I also tried to insert the class in the html of the library by hand, but it is removed automatically. Can someone tell me what reasons it may have that the class is not written?

First is the direct implementation and the second ist with my library: screenshot of the DOM


Solution

  • In this case, the issue was the library had ivy enabled the project self not. Enable Ivy in the Project fix the issue