2

I'm trying to make the auto-resize directive work but i have an unexpected behavior when the width of the container is shrinking. The ui-grid is not shrinking (it works on expand).

Here is a plunker of my app layout with the problem i'm facing :

http://plnkr.co/edit/IjV4RbEQmkJFBH5t?preview

If i add a width: 100% !important to the grid class the grid start expanding without ever stopping.

Do i have to rewrite the auto-resize directive or is there an other way with css ?

Tom
  • 133
  • 2
  • 11
  • Can you provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), please? – Anton Aug 03 '21 at 13:29
  • There is a plnkr link with a full example, you doesn't have access to it ? – Tom Aug 03 '21 at 13:38

1 Answers1

0

I can't see your code so not sure what you're trying to do.

.parent {
  display: flex;
}

.resize {
  flex: 1 1 auto;
}

Using flex: 1 1 auto on a child where a parent has display: flex will have it automatically expand to fit the parent.

  • You cannot see the plunker code ? This is what i have done on the parent container of the ui-grid but the ui-grid doesn't follow the flex rule. – Tom Aug 03 '21 at 13:37