forked from extern/egroupware
Check if the et2_hbox is attached before calling its child getDOMNode cause it's might not be set yet
This commit is contained in:
parent
d889443e70
commit
9958c93c13
@ -160,7 +160,7 @@ var et2_hbox = /** @class */ (function (_super) {
|
||||
*/
|
||||
et2_hbox.prototype.addChild = function (child) {
|
||||
_super.prototype.addChild.call(this, child);
|
||||
if (child.instanceOf && child.instanceOf(et2_grid) || child._type == 'et2_grid') {
|
||||
if (child.instanceOf && child.instanceOf(et2_grid) && this.isAttached() || child._type == 'et2_grid' && this.isAttached()) {
|
||||
jQuery(child.getDOMNode(child)).css("display", "inline-table");
|
||||
}
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"et2_widget_hbox.js","sourceRoot":"","sources":["et2_widget_hbox.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;AAEH;;;EAGE;AAEF,+DAA2D;AAC3D,qDAAoE;AACpE,6DAAqD;AAErD;;;;GAIG;AACH;IAAuB,4BAAc;IAcpC;;;;OAIG;IACH,kBAAY,OAAQ,EAAE,MAAsB,EAAE,MAAgB;QAA9D,YAEC,kBAAM,OAAO,EAAE,MAAM,EAAE,0CAAmB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,SAUhG;QA7BD,qBAAe,GAAY,IAAI,CAAC;QAChC,eAAS,GAAS;YACjB,UAAU,EAAE,KAAK;YACjB,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,MAAM;SACnB,CAAC;QACF,aAAO,GAAY,IAAI,CAAC;QACxB,cAAQ,GAAY,IAAI,CAAC;QACzB,SAAG,GAAY,IAAI,CAAC;QAWnB,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,KAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,KAAI,CAAC,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,aA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AAI,IAAI,EAC7C;gBACC,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;aACxB;SACD;QAED,sCAAsC;QACtC,OAAO,iBAAM,UAAU,YAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,2BAAQ,GAAR,UAAS,KAAK;QACb,iBAAM,QAAQ,YAAC,KAAK,CAAC,CAAC;QACtB,IAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,KAAK,CAAC,KAAK,IAAI,UAAU,IAAI,IAAI,CAAC,UAAU,EAAE,EACxH;YACC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;SAC/D;IACF,CAAC;IACF,eAAC;AAAD,CAAC,AArKD,CAAuB,oCAAc,GAqKpC;AACD,qCAAmB,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
@ -182,7 +182,7 @@ class et2_hbox extends et2_baseWidget
|
||||
*/
|
||||
addChild(child) {
|
||||
super.addChild(child);
|
||||
if(child.instanceOf && child.instanceOf(et2_grid) || child._type == 'et2_grid')
|
||||
if(child.instanceOf && child.instanceOf(et2_grid) && this.isAttached() || child._type == 'et2_grid' && this.isAttached())
|
||||
{
|
||||
jQuery(child.getDOMNode(child)).css("display", "inline-table");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user