ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

grid width not filling out ngCanvas

Open bradrice opened this issue 13 years ago • 15 comments

I have this set in my css:

.gridStyle { border: 1px solid rgb(212,212,212); height: 600px; /max-height: 800px;/ width: 750px; margin: 1em; }

For some reason I have an empty space at the right of the grid before the scroll bar. It seem like regardless I do it will not fill out. If I inspect the element I get this being specified:

.ng1368027839598 .ngRow { width: 700px; }

Why does it subtract 50 pixels from what I have specified? Can I over-ride it so the columns go the entire way across?

bradrice avatar May 08 '13 18:05 bradrice

I've been finding the same problem. Driving me mad

AlexRoscoe avatar Jun 18 '13 19:06 AlexRoscoe

@AlexRoscoe @bradrice Can you try with the latest version? It's pointing at the 2.0.7 branch.

http://plnkr.co/edit/dyA446?p=preview

jonricaurte avatar Jun 25 '13 06:06 jonricaurte

This should be fixed in the latest version.

jonricaurte avatar Jul 03 '13 05:07 jonricaurte

@jonricaurte This is still happening in 2.0.7. The above plunker doesn't show any data. As far as I can see, the grid is setting a fixed 100px to the width property of the .ngCanvas element. It initially only renders the columns that fit in that width. If you scroll horizontally, it dynamically adds other columns, but the narrow viewport remains. Clicking on a column header displays the grid as configured.

image

For some reason, this doesn't happen on all grids in this application even though they are configured in a similar way.

dotcom9 avatar Aug 05 '13 11:08 dotcom9

I have the exact same issue. Has this been resolved?

wjdavis5 avatar Feb 12 '14 02:02 wjdavis5

Same issue as the OP, although it only manifests when the parent controller has the $modal service injected.

ianlyons avatar Jul 03 '14 18:07 ianlyons

I have the same problem.

The width of the ngCanvas is subtracted from 1069 (of the grid) to 1052.

tss

Any ideias?

jlnery-zz avatar Aug 28 '14 21:08 jlnery-zz

@jlnery which version are you using? How is the grid being displayed, directly on the page? In a modal? What browser?

c0bra avatar Sep 02 '14 15:09 c0bra

@c0bra Version: 1.2.14 Directly on page. Chrome and Mozilla

jlnery-zz avatar Sep 11 '14 19:09 jlnery-zz

@c0bra sorry: version 2.0.7

jlnery-zz avatar Sep 11 '14 19:09 jlnery-zz

What OS? There are some funny issues with OSX in 3.0, perhaps that's related here as well? I think we'll have to take a collection to buy @c0bra a MacBook. :-)

PaulL1 avatar Sep 11 '14 22:09 PaulL1

Windows ! :(

jlnery-zz avatar Sep 11 '14 22:09 jlnery-zz

Still seeing this in v3.0.7 on Windows for Chrome, FF, and IE. Basically the same screenshot as jlnery. Maybe a scroll-bar width calculation issue?

adammatthewsmith avatar Mar 31 '16 15:03 adammatthewsmith

I'm still seeing this too but like this... using v3.0.7 MacOSx Chrome. It fixes if I resize the window. It's fine if they are all on one page but I'm trying to move my data tables into tabs. The first grid tab I show is sized correctly and when switching to the other view I get this issue. screen shot 2016-03-31 at 1 15 24 pm

sshkuratoff avatar Mar 31 '16 20:03 sshkuratoff

I am also facing same problem only on Chrome. Any lead on how to fix this ?

poojacmore avatar Jun 05 '18 12:06 poojacmore