-
Notifications
You must be signed in to change notification settings - Fork 186
Open
Description
If you are using a Bucket, and then try to use a render element that contains a Bucket, the prefix and suffix will be rendered twice.
var bucketContent = {
_prefix: '<div class="foo">',
_suffix: '</div>',
stuff: {
_theme: 'bucket',
_attributes: {
id: 'my-bucket'
},
/* ... */
}
};
fill(bucketContent);
You'll end up with html like this:
<div class="foo">
<div class="foo">
<div id="my-bucket">...</div>
</div>
</div>
This may be a problem with dg.render() itself and not limited to just the Bucket widget.
The workaround is to use _markup
instead of _theme
:
var bucketContent = {
_prefix: '<div class="foo">',
_suffix: '</div>',
stuff: {
_markup: dg.theme('bucket', {
_attributes: {
id: 'my-bucket'
},
/* ... */
})
}
};
fill(bucketContent);