Reputation: 2875
this.rows.push(new Row({
data: this.data
}, this.body));
This will place the new Row widget at this.body
, <tbody data-dojo-attach-point="body"></tbody>
- however I want to place the new Row widget within the table body, not replace the tbody 'body' attach point with the new Row.
How can I achieve this?
Upvotes: 1
Views: 728
Reputation: 14702
If your Row
inherit from a dijit (_Widget
) , so by default it has a placeAt (see doc)function that place your widget to the desired place . so the code would be like
this.rows.push(
new Row({
data: this.data
}).placeAt(this.body);
);
Otherwise you can reach this last by using the [dojo/dom-construct][2]
class to place your widget in specific ref
first import the dojo/dom-construct
-> domConstruct
then
place you widget inside the table body by using domConstruct.place(node, reference);
var row = new Row({
data: this.data
});
this.rows.push(row);
domConstruct.place(node.btn.domNode, this.body);
Upvotes: 1