Open signalpoint opened 3 years ago
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:
_markup
_theme
var bucketContent = { _prefix: '<div class="foo">', _suffix: '</div>', stuff: { _markup: dg.theme('bucket', { _attributes: { id: 'my-bucket' }, /* ... */ }) } }; fill(bucketContent);
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.
You'll end up with html like this:
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
: