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.

Hi there, I need the table to expand within its container, and I need one of the columns to take up the space that is not explicitly allocated to the others (there is such feature on ExtJS, I come from there, it’s a nice one 😉 ) So, I guess that the way to go about that is to recalc the column width on every table update, and then set it via refs? Is that right? I would appreciate a tip how to implement that… Also, if I want to set column width in percentage, would the same approach be OK?

Example 1:

{
  column1:  {width: 100},
  column2: {
     autoExpand: true
  }
}

Example 2:

{
  column1:  {width: '10%},
  column2: {
     width: '90%',
  }
}

How big would the performance penalty for such a feature? Thanks in advance 😃

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
bebrawcommented, Aug 14, 2016

Hi,

I think we can pull this off through CSS. You could set something like

[
  {
    props: {
      style: {
        width: '100%'
      }
    },
    ...
  },
  ...
]

That will propagate to both header and body cells. An alternative would be to set a className for a header cell and then control that through a separate CSS definition.

I think I’ll write a little demo for this.

0reactions
venelin-mihaylovcommented, Aug 15, 2016

For my use case, straight calc() will be enough (I hope). I can see that if an option to resize/move/hide columns is present, then calc() will have to be managed by react …

Read more comments on GitHub >

github_iconTop Results From Across the Web

[CLOSED] grid panel autoExpandColumn not working
Hi, The datagrid generated with the code below does not render at all when I set the autoExpandColumn to the name of the...
Read more >
Column Width Problem (autoExpandColumn & forceFit set to ...
I've tried to use autoExpandColumn config to resize only the first column, But it didn't work :( How can I achieve it? Can...
Read more >
Set autoExpandColumn for GridPanel - Ext JS - Java2s.com
7. Table Selection. 8. The Grid demonstrates the use of creation of derived fields in a Record created using a custom convert function,...
Read more >
GridView (GXT 4.0.3)
autoExpandColumn ). The id of a column in this grid that should expand to fill unused space (pre-render). void, setAutoExpandMax(int autoExpandMax).
Read more >
Column Width Problem (autoExpandColumn & forceFit set to ...
Coding example for the question Column Width Problem (autoExpandColumn & forceFit set to true in the same grid)-ext.js.
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