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.

Table does not load data until until I hover over something

See original GitHub issue

Here is a video showing the problem: smarttable

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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
petermag90commented, Jul 3, 2019

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.

0reactions
victorwvieiracommented, Jan 11, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

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