|
|
@@ -1692,10 +1692,13 @@
|
|
|
that.trigger('collapse-row', index, row);
|
|
|
} else {
|
|
|
$this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
|
|
|
- $tr.after(sprintf('<tr class="detail-view"><td colspan="%s">%s</td></tr>',
|
|
|
- $tr.find('td').length, calculateObjectValue(that.options,
|
|
|
- that.options.detailFormatter, [index, row], '')));
|
|
|
- that.trigger('expand-row', index, row, $tr.next().find('td'));
|
|
|
+ $tr.after(sprintf('<tr class="detail-view"><td colspan="%s"></td></tr>', $tr.find('td').length));
|
|
|
+ var $element = $tr.next().find('td');
|
|
|
+ var content = calculateObjectValue(that.options, that.options.detailFormatter, [index, row, $element], '');
|
|
|
+ if($element.length === 1) {
|
|
|
+ $element.append(content);
|
|
|
+ }
|
|
|
+ that.trigger('expand-row', index, row, $element);
|
|
|
}
|
|
|
that.resetView();
|
|
|
});
|