Relax hz-table parent requirement

hz-expand-detail is a pretty handy directive to use in normal
HTML tables. This patch changes the parent directive requirement
to be optional.

Change-Id: Ic0b0c7af6143ec1d654cb277503342693d051b50
Closes-Bug: #1580809
This commit is contained in:
Tyr Johanson 2016-05-25 09:49:06 -06:00 committed by Matt Borland
parent b0d1c88bbd
commit fe98059ca1

View File

@ -59,7 +59,7 @@
function hzExpandDetail(settings) {
var directive = {
restrict: 'A',
require: '^hzTable',
require: '?^hzTable',
scope: {
icons: '@hzExpandDetail',
duration: '@',
@ -101,7 +101,7 @@
detailCell.wrapInner('<div class="detail-expanded"></div>');
}
if (scope.item) {
if (scope.item && hzTableCtrl) {
hzTableCtrl.broadcastExpansion(scope.item);
}