question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

conditional footer is not working anymore

See original GitHub issue

I’m submitting a …

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior When i add a ngx-datatable-footer in my ngx-datatable, i can see the footer properly displayed. When i make the ngx-datatable-footer conditional with *ngIf, the footer never get displayed even when condition is true. This problem seems related to Angular 8 with the static ViewChild/ContentChild update.

Expected behavior The footer should display.

Reproduction of the problem See stackblitz example With *ngIf="true" it does not display the custom footer. Remove *ngIf="true" to make the custom footer appear.

What is the motivation / use case for changing the behavior? I want to display the footer when a condition is matched

Please tell us about your environment: Win10, Angular8

  • Table version: 15.0.0

  • Angular version: 8.0.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all

  • Language: [all | TypeScript X.X | ES6/7 | ES5] all

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
marjan-georgievcommented, Jun 3, 2019

released 15.0.1

@daresais I am looking at that now. The issue is with the new static property that we had to add to all ContentChild and ViewChild directives.

1reaction
wentjuncommented, Jun 19, 2019

Hi there, I understand that this issue is closed, but I seem to be facing another issue that is related to this issue after updating ngx-datatable to version 15.0.2. If I do something like this, the custom stylings/pipes applied within ng-template will not be applied.

<ngx-datatable class="bootstrap" [rows]="list" [columns]="columns">
  <ngx-datatable-column *ngFor="let column of columns; let i = index;" name="{{column.name}}" prop="{{column.prop}}">
    <ng-template let-value="value" *ngIf="column.prop==='buyOrSell'||column.prop==='tradeType'" ngx-datatable-cell-template>
      {{ value | titlecase }}
    </ng-template>
  </ngx-datatable-column>
</ngx-datatable>

My workaround to solve the above issue would be the following:

<ng-template let-value="value" ngx-datatable-cell-template>
  <span  *ngIf="column.prop==='buyOrSell'||column.prop==='tradeType'">
    {{ value | titlecase }}
  </span>
</ng-template>

I am currently using Angular version 8.0.1, and my ngx-datatable is of version 15.0.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Word 2007 - Conditional Footer text not working
I have a Word document that I have imported a data table into to manually generate a form that our ERP system keeps...
Read more >
position fixed is not working - Stack Overflow
My issue was that a parent element had transform: scale(1); this apparently makes it impossible for any element to be fixed inside it....
Read more >
How to Resolve a Fluid Header/Footer Problem When the ...
The problem happens under the following circumstances: (1) The header and footer of the page have no specified width; (2) The content area ......
Read more >
Conditional fields not showing - WordPress.org
I have a page where I use conditional fields to show extra fields when selecting a certain selectbox. It used to work without...
Read more >
How to use fields to create a conditional header or footer in a ...
If you run into a conditional header or footer request that you can't handle, take a look at Word fields. They're not magic,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found