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.

column names are not shown if the slickgrid table is not on the screen

See original GitHub issue

I’m submitting a Bug report

Your Environment

Software Version(s)
Aurelia 2.0.2
Aurelia-Slickgrid 3.2.1
TypeScript vanilla JS
Operating System windows 10 20h2
NPM/Node/Yarn 14.15.4

Context

I have several tabs on in the web-application. one of my slickgrid tables is there. If I open this tab, everything goes well except the column names, they are all not displayed until I do next:

  1. resize the window.
  2. run this code when the tab is opened:
let cols = this.grid.getColumns();
this.grid.setColumns(cols);

issue image: image

Expected Behavior

After I open any of the tabs (where there is a slickgrid table), the slickgrid table’s column names is not sized (shown) correctly and do not displayed on a page

Current Behavior

After I open any of the tabs (where there is a slickgrid table), column names must be sized (shown) correctly on a page

Possible Solution

But this is just a workaround, I believe there is better solution there.

let cols = this.grid.getColumns();
this.grid.setColumns(cols);

Code Sample

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
ghiscodingcommented, Feb 27, 2021

You should ask these kind of questions on Stack Overflow where many more users could answer but to answer some of the questions

  • Read Grid & DataView Events
    • use the onSelectedRowsChanged to get info of what changed (before/after), if you want to know if everything is selected then check its new length against your dataset length I guess that would work without looping through them all
  • setSelectedRows is the correct way to change selection and if you need to add a setTimeout then it’s because you have a racing condition somewhere (something else is changing or rendering the grid)
0reactions
ghiscodingcommented, Mar 2, 2021

The onSelectedRowsChanged event is not from my lib but from SlickGrid itself (core) lib itself, on this line, so if you want some changes then you can contribute and create a PR (Pull Request) on 6pac/SlickGrid fork, the Example 22 was modified with that missing code for that reason.

So I think I have answered all your questions and again if you have more questions, I suggest you ask on Stack Overflow since there a lot more people that can answer (I answer some there too)

Cheers ⭐

Read more comments on GitHub >

github_iconTop Results From Across the Web

SlickGrid column headers not synched when in Full Screen ...
What we need is a method to repaint the column Headers without repainting the entire grid or a patch from someone who has...
Read more >
Adding/removing columns programmatically removes the row ...
So far so good. The issue is when these columns are removed because the grid Menu still show them, and you could even...
Read more >
Column names do not appear in the Tables & Columns module
In the Table Names pane, select configuration item [cmdb_ci]. Note that the fields do not appear in the Column Names pane. Workaround. If...
Read more >
Aurelia SlickGrid
Aurelia-Slickgrid is basically a data grid that's a wrapper around the popular SlickGrid jQuery library (which has been around for well over 10 ......
Read more >
Datagrid and SlickGrid - Frames - morphis Confluence
If the grid doesn't have frozen columns, only references ending in L ... the rendering process and will not appear in the grid...
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