diff --git a/src/client/js/directives/form.ts b/src/client/js/directives/form.ts index 405930e6..532aa078 100644 --- a/src/client/js/directives/form.ts +++ b/src/client/js/directives/form.ts @@ -586,7 +586,8 @@ module fng.directives { /* Array footer */ if (info.noAdd !== true || typeof info.customFooter == 'string' || info.noneIndicator) { let footer: string = ''; - if (typeof info.customFooter == 'string') { + const hasCustomFooter = typeof info.customFooter == 'string'; + if (hasCustomFooter) { footer = info.customFooter; } let hideCond = ''; @@ -605,12 +606,14 @@ module fng.directives { } if (info.noneIndicator) { footer += `None`; - // hideCond for the schema-foot is if there's no add button and no indicator - hideCond = `${model}.length > 0`; - if (info.noAdd === true) { - hideCond = `ng-hide="${hideCond}"`; - } else { - hideCond = info.noAdd ? `ng-hide="${info.noAdd} && ${hideCond}"` : ''; + // hideCond for the schema-foot is if there's no add button, no custom footer and no indicator + if (!hasCustomFooter) { + hideCond = `${model}.length > 0`; + if (info.noAdd === true) { + hideCond = `ng-hide="${hideCond}"`; + } else { + hideCond = info.noAdd ? `ng-hide="${info.noAdd} && ${hideCond}"` : ''; + } } } if (footer !== '') {