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.

[flexGrow]="1" [maxWidth]="30" - maxWidth applied only in header cell;

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior [flexGrow]=“1” [maxWidth]=“30” - maxWidth applied only in header cell

Expected behavior [maxWidth] should be applied only all column cells

Reproduction of the problem

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Table version: 0.6.3
  • Angular version: 2.4.8
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:7
  • Comments:5

github_iconTop GitHub Comments

5reactions
eyevcommented, Sep 15, 2017

Just want to let you know, I was able to get around this bug by applying [maxWidth] and [width] to the column…

1reaction
DanielCasperscommented, Dec 14, 2017

@eyev, I just tried your solution. It did not work for me. Also, I don’t understand why that would have an effect as the API docs for width show a default value of 150.

Here are the specifics of my table. I’ve deleted all unrelated properties from my example here, including inner content of columns. I am using material theme, and added a border around the cells to clearly indicate the problem.

<ngx-datatable
        class="material"
	[columnMode]="'flex'"
	[draggable]="false"
	[headerHeight]="48"
	[rowHeight]="'auto'">

	<ngx-datatable-column
		[draggable]="false"
		[minWidth]="63"
		[resizeable]="false">
	</ngx-datatable-column>

	<ngx-datatable-column
		[draggable]="false"
		[flexGrow]="2"
		[resizeable]="false">
	</ngx-datatable-column>
	
	<!-- The column giving me grief -->
	<ngx-datatable-column
		[draggable]="false"
		[flexGrow]="4"
		[maxWidth]="400"
		[resizeable]="false">
	</ngx-datatable-column>
	
	<ngx-datatable-column
		[draggable]="false"
		[flexGrow]="1"
		[resizeable]="false">
	</ngx-datatable-column>
	
	<ngx-datatable-column
		[draggable]="false"
		[flexGrow]="1"
		[resizeable]="false">
	</ngx-datatable-column>
</ngx-datatable>

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

flex-grow - CSS: Cascading Style Sheets - MDN Web Docs
The main size is either width or height of the item which is dependent on the flex-direction value. The remaining space is the...
Read more >
Max-width not working on Flexbox item (item is shrinking to ...
I've made this a Flex container. Inside the flex container is one child div (containing a heading). This flex item should be aligned...
Read more >
`flex-grow` is weird. Or is it? | CSS-Tricks
If we apply display: flex; to the parent element and don't change ... initial aside width + (aside flex-grow value * “one flex-grow”)...
Read more >
Flex - Bootstrap
Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive flexbox utilities.
Read more >
Is flex-basis the same as setting width? - Codecademy Forums
flex-basis is limited by both max-width/max-height and ... i.e. the values set for flex-grow and flex-shrink will WAIT to apply only WHEN ...
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