question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bootstrap theme is not working

See original GitHub issue

I’m submitting a … (check one with “x”)

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

Current behavior

Expected behavior

Reproduction of the problem

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

Please tell us about your environment:

  • Table version: 0.8.x
  • Angular version: 2.0.x
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

I tried to add the bootstrap them on a component but it’s not working As per the bootstrap component https://github.com/swimlane/ngx-datatable/blob/master/demo/basic/bootstrap.component.ts : My component : @Component({ selector: 'basic-bootstrap-theme-demo', template: <div> <ngx-datatable class=“bootstrap” [rows]=“rows” [loadingIndicator]=“loadingIndicator” [columns]=“columns” [columnMode]=“‘force’” [headerHeight]=“40” [footerHeight]=“40” [limit]=“10” [rowHeight]=“‘auto’” [reorderable]=“reorderable”> </ngx-datatable> </div> ` }) export class BootstrapThemeComponent {

rows = []; loadingIndicator: boolean = true; reorderable: boolean = true;

columns = [ { prop: ‘name’ }, { name: ‘Gender’ }, { name: ‘Company’ } ];

constructor() { this.fetch((data) => { this.rows = data; setTimeout(() => { this.loadingIndicator = false; }, 1500); }); }

fetch(cb) { const req = new XMLHttpRequest(); req.open(‘GET’, https://raw.githubusercontent.com/swimlane/ngx-datatable/master/assets/data/company.json);

req.onload = () => {
  cb(JSON.parse(req.response));
};

req.send();

}

}`

My component css :

@import '~@swimlane/ngx-datatable/release/index.css'; @import '~@swimlane/ngx-datatable/release/themes/bootstrap.css'; @import '~@swimlane/ngx-datatable/release/assets/icons.css';

I includes bootstrap 3.3.7 link in the index.html page

Here is the result 2018-04-04_175241 It should look like :+1 2018-04-04_175532

Solution:

ADD themes in parent styles.css file but the folllowing problem occur ; 2018-04-04_182310

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12

github_iconTop GitHub Comments

7reactions
sgriff96commented, Feb 10, 2019

Adding this to the styles.css file worked for me @import "../node_modules/@swimlane/ngx-datatable/release/themes/bootstrap.css"

2reactions
soportehrmcommented, Apr 5, 2020

I’m still having issues with it, my table looks all white. image

This is my angular.json image

Guys can you please also update the docs ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap Template not working properly - Stack Overflow
I am running the source code on Xamp using the local host but the carousel element is not being displayed.
Read more >
Simple Bootstrap template - not showing as it should
Hello all I am using bootstrap 4.3.1. I am on Mac, and Flask. I am on localhost. I have background in Python, but...
Read more >
Guide - Bootstrap Themes
This guide will help you get started with a Bootstrap Theme, including how to run, customize, update, and integrate your theme!
Read more >
Adding Themes in Bootstrap Studio - Problem! - YouTube
Email: thenbman@hotmail.co.ukAdding themes in BSS should be cake, it ain't. Anyone else find a solution, not a one where you have to do...
Read more >
10 Most Common Bootstrap Mistakes That Developers Make
It comes bundled with basic HTML and CSS design templates that include many ... We will take a look at 10 of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found