Table does not load data until until I hover over something
See original GitHub issueHere is a video showing the problem:
Table won’t load data if I don’t hover over menu on the left. Data is fetched correctly. Strange behaviour right? Removing spinner does not help. Here are my settings, and the way I’m fetching data:
TABLE_SETTINGS_SUBJECT = {
add: {
addButtonContent: '<i class="nb-plus"></i>',
createButtonContent: '<i class="nb-checkmark"></i>',
cancelButtonContent: '<i class="nb-close"></i>',
confirmCreate: true
},
edit: {
editButtonContent: '<i class="nb-edit"></i>',
saveButtonContent: '<i class="nb-checkmark"></i>',
cancelButtonContent: '<i class="nb-close"></i>',
confirmSave: true
},
actions: {
delete: false
},
columns: {
id: {
title: 'ID',
editable: false,
creatable: false
},
name: {
title: 'Name'
}
}
};
Data fetching:
this._subject.getAllSubjects().subscribe((data: ISubject[]) => {
this.subjects = data;
this.dataSource.load(this.subjects);
this.dataSource.reset();
this.data_loading = false;
},
Using latest ng2 smart table version, with ng2 completer and rxjs-compat for resolving issues with deprecation
Any suggestions?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Angular material table not showing data until I click paging links
Initialise pagination on ngAfterViewInit hooks lifecycle. here's example, ngAfterViewInit() { this.dataSource.paginator = this.paginator; }.
Read more >Manage linked tables - Microsoft Support
In the Linked Table Manager dialog box, select the data source, hover over the data source, and then select Edit. Change the information...
Read more >25 Amazing Power Query Tips and Tricks | How To Excel
You can hover the cursor over the query until the peek window appears, then press the Edit button from the peek window. The...
Read more >.hover() | jQuery API Documentation
A function to execute when the mouse pointer leaves the element. The .hover() method binds handlers for both mouseenter and mouseleave events. You...
Read more >Some rows are not updated until I hover over with the mouse
The content of the first row is not refreshed until I hover over with ... In such a case, you can manually tell...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for taking your time. I realise now that my problem is related to changedetection. I was using the table inside a component with OnPush changedetection. Turning that off makes my scenario work. I must say that I am not completely comfortable with that changedetectionstrategy, but i am trying to use it as much as I can, but sometimes i stumble inte problems i do not fully understand. So the change itself did not trigger the changedetection, but when i hovered in the table the change was detected.
Recently I had an experience using a smart-table component that some rows/data in the table just appears when the mouse hovers over the table or happens other interaction on the screen.
After investing some time in debugging I found the problem that create this strange behaviour. I’m using custom components and I developed some rules inside of these custom components, every time that these rules broke, the table stops loading the data and stay with this “hover” behaviour.
Solving the broken code inside of each custom component solved my problem and stopped this strange behaviour.
The broken code was a variable, type: number, using a string function like
.toLowerCase()
function.