- // Size the owning group to the size of its sub headers
- if (siblings[len - 1].rendered) {
-
- for (i = 0; i < len; i++) {
- newWidth += (siblings[i] === me) ? width : siblings[i].getWidth();
+ /*
+ * setSize will be called for each column as it's rendered
+ * so we want to wait until all sub columns have been rendered
+ * before we try and calculate the size of the outer container.
+ * We also take into account hidden columns, because they won't
+ * be rendered, but we'll still need to make the calculation.
+ */
+ for (i = 0; i < len; i++) {
+ sibling = siblings[i];
+ hidden = sibling.hidden;
+ if (!sibling.rendered && !hidden) {
+ readyForSizing = false;
+ break;
+ }
+ if (!hidden) {
+ newWidth += (sibling === me) ? width : sibling.getWidth();