filepond icon indicating copy to clipboard operation
filepond copied to clipboard

Incorrect height of panel with multiple items in row

Open soarer1004 opened this issue 3 years ago • 3 comments
trafficstars

If there is multiple images with different height in one row, panel height calculates incorrect because based on first child height. Also rows can overlap each other if add images with different height.

Example

soarer1004 avatar Jun 16 '22 10:06 soarer1004

appreciate the PR will review when I have some time

rikschennink avatar Jun 27 '22 07:06 rikschennink

I think this PR might help with the problem I'm having. When I add some invalid file with some other valid files, the container loses height because it sets the new height according to the height of the invalid file and not everyone inside the container.

caioalexandre avatar Feb 09 '23 14:02 caioalexandre

I used a work around by simply giving all items (containers) the same (minimal) height and a border in an additional CSS file:

li.filepond--item {
	min-height: 256px;
	border: dotted 2px #CCC;
	border-radius: 0.5em;
}

Additionally I gave the drop area a fixed height, in my case the whole page. You can simply put it in a div with a fixed height and you are good to go.

html {
	height: 100%;
	width: 100%;
}

*  {
	margin: 0;
} 

.filepond--root {
    height: calc(100vh - 20px);  /* Change  this to 100% and put the element in a container div with the desired height */
    border: 1px solid #CCC;
    padding: 10px;
    margin: 10px;
}

Maybe that works for you.

R-W-C avatar Mar 27 '24 22:03 R-W-C