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.

Datatable columns not showing inline

See original GitHub issue

Hey guys,

I might be doing something wrong since I don’t see any other posts regarding this problem, but I assume I am not since I’m experiencing this issue with a just created project as well.

I am just trying to create a data-table, but the columns are showing up underneath each other instead of next to each other.

I have simply copied the basic example that can be found in the ‘demo’ folder

@Component({
  selector: 'app-root',
  template: `
  	<div>
      <h3>Fluid Row Heights</h3>
      <datatable
        class="material"
        [rows]="rows"
        [columns]="columns"
        [columnMode]="'force'"
        [headerHeight]="50"
        [footerHeight]="50"
        [rowHeight]="'auto'">
      </datatable>
    </div>
  `,
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  rows = [];

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

  constructor() {
    this.fetch((data) => {
      this.rows = data;
    });
  }

  fetch(cb) {
    const req = new XMLHttpRequest();
    req.open('GET', `assets/data.json`);

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

    req.send();
  }
}

but even with just a clean newly created project, with only this plugin added, the problem still occurs:

image

Any ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
shattarcommented, Nov 13, 2016

Did you import the datatable css styles?

0reactions
amcdnlcommented, Jan 24, 2017

I’m gonna be adding this by default in next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inline editing not working with hidden columns - DataTables
Hey guys i got a problem with inline editing. I have hidden some columns by default and they get shown on click of...
Read more >
Inline Column Width not working with DataTables
I have been trying to scratch my head with ...
Read more >
Solved: Column Name is not shown when an inline action but...
I believe so, yes. Typically, a column has only one inline action attached to it. In that case, the column name would likely...
Read more >
Unable to Get Lightning Datatable Columns in Inline Edit Event
I am new to building a Lightning Web Component and I have what feels like a basic validation using the row's data for...
Read more >
Inline editing not working in datatable - Salesforce Developers
Inline editing not working in datatable ... Three important parts of datatable is Key , data and columns so we need attribute for...
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