| Summary: | [Table][Tree] Column header with zero size become visible | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Markus Duft <markus.duft> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | tbuschto |
| Version: | 2.0 | ||
| Target Milestone: | 2.1 M1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Markus Duft
It's working in Firefox (tested version 19.0), but not in IE, Chrome and Opera. at least it's reproducible - phew ;) and i can confirm that none of the observed issues happen with firefox inside our application i came up with this for our application:
/*
* Override grid column header rendering to hide labels for width=0 columns
*/
rwt.qx.Mixin.define("com.wamas.TableHeaderLabelPatch", {
members : {
_renderLabel : function(label, column) {
this.base(arguments, label, column);
if(column.getWidth() == 0) {
label.setVisibility(false);
}
}
}
});
(function() {
try {
// force prototype to be created.
new rwt.widgets.base.GridHeader();
} catch(ex) {
// ignore
}
rwt.qx.Class.patch(rwt.widgets.base.GridHeader, com.wamas.TableHeaderLabelPatch);
})();
i think the easy implementation for RWT could be just to do the label.setVisibility(false) in the _renderLabel of the GridHeader.
tested with chrome, firefox, ie10
Fixed with commit 0f73cd6fd59397ee96cb4b3c1251c2e402ae405f. The general issue applied to all widgets managed by CanvasLayoutImpl.js, where the computeChildBoxWidth method ignored the fact that "0" is falsy in JavaScript. That's why using "===" is generally a good idea. However, even with that fixed the columns border was still visible, so i changed GridHeader.js to render Columns with width 0 exlicitly as not visible. Is this issue bug 403049 related? Is it fixed too? |