简体   繁体   中英

ngx-datatable - Bootstrap theme - Column headers

I'm trying to implement ngx-datatable with the implementation of the theming for Bootstrap.

I'm adding the Bootstrap CSS from both Bootstrap 4 and from ngx-datatable on the app styles:

"styles": [
          "node_modules/bootstrap/dist/css/bootstrap.css",
          "node_modules/@swimlane/ngx-datatable/release/themes/bootstrap.css",
          "src/styles.css"
        ],

And then implementing the table on my page component:

<ngx-datatable class="bootstrap"
[rows]="tablePage.results"
[columns]="columns"
[columnMode]="'force'"
[rowHeight]="'auto'"
[headerHeight]="50"
[footerHeight]="50"
[externalPaging]="true"
[loadingIndicator]="loading"
[count]="tablePage.pager.count"
[offset]="tablePage.pager.offset"
[limit]="tablePage.pager.limit"
[reorderable]="true"
(page)='setPage($event)'>

Also, the modules are all imported into the app module:

imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
NgbModule,
FontAwesomeModule,
NgxDatatableModule
],

The problem comes with the fact that no column header icons are shown. None of the sorting direction icons are shown and I don't know what else to add since everything seems setup just like in the demo site.

don't forget to include node_modules/swimlane/ngx-datatable/release/assets/icons.css

or for sass @import '~@swimlane/ngx-datatable/release/assets/icons.css';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM