1

I am using bwu_datagrid in my Dart/Polymer webapp. In a paper-action-dialog, I am using the "grouping" grid to show a tree-table. The first time the dialog is opened, the grid looks fine. The second time the dialog is opened, it is fine in Chrome, but when I use Firefox or Safari, the columns in the non-grouped rows are scrunched to the left (overlapping each other), and the column headers have disappeared.

This was also happening in Chrome until I added the following code in the dialog's core-overlay-open-completed event handler:

grid.setColumns = columns;
grid.invalidate();
grid.render();

It appears that someone reported a similar issue back in November. Was this issue ever resolved and/or fixed?

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
gtaylor20
  • 23
  • 5
  • There are several open issues with Firefox. I didn't have time yet to look into them. There is still a lot of work to do to improve overall code quality (refactor to make the code less JSy and more Darty) and some examples are not yet ported and therefore the related code in bwu_datagrid not tested. I want to finish this before I try to fix browser specific bugs. Good Firefox support might still take some time ... sorry for that. – Günter Zöchbauer Jan 29 '15 at 09:24

1 Answers1

1

I have come up with a workaround, that at least works for me and for the "issue 97 reattach" example that has been posted elsewhere. I don't know why it works, but I added a new method to bwu_datagrid.dart, called reshowGrid(). This new method is a stripped down version of "setColumns". I think the real key may be the commented out "style append".

void reshowGrid() { 
    if (_initialized) { 
        invalidateAllRows(); 
        _createColumnHeaders(); 
        _removeCssRules(); 
        _createCssRules(); 
        resizeCanvas(); 
        _applyColumnWidths(); 
        //this.shadowRoot.append(_style); 
        _handleScroll(); 
    } 
} 

I call grid.reshowGrid() instead of grid.setColumns.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
gtaylor20
  • 23
  • 5