Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListView inside angular component not refreshing on data load with Pager #120

Closed
tahir-jamil opened this issue May 30, 2019 · 0 comments
Closed

Comments

@tahir-jamil
Copy link

tahir-jamil commented May 30, 2019

When we use listview component in pager wrapped by angular component, then listview's is not rendered on data load until user interacts with the ui to cause the ui to refresh/re-render.

When listview is directly used inside pager without using angular component, then it behaves fine on data load.

Not working on both android and ios.

Demo to reproduce the issue: link
https://github.com/tahir-jamil/pager-listview-refresh

Sample code with issue:

<GridLayout class="page">
    <Pager [items]="['a','b']" #pager class="pager">
        <ng-template let-i="index" let-item="item">
            <GridLayout class="pager-item"  columns="*" backgroundColor="red">
               <ns-listview></ns-listview>
            </GridLayout>
        </ng-template>
    </Pager>
</GridLayout>

listview component

<ListView [items]="source" class="list-group">
  <ng-template let-item="item" let-odd="odd" let-even="even">
    <StackLayout>
      <Label [text]="item.employee_name" class="list-group-item"></Label>
    </StackLayout>
  </ng-template>
</ListView>

package.json

{
  "nativescript": {
    "id": "org.nativescript.pagerListview",
    "tns-android": {
      "version": "5.3.1"
    },
    "tns-ios": {
      "version": "5.3.1"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~7.2.0",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/http": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "nativescript-angular": "^7.2.4",
    "nativescript-pager": "^9.5.4",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.12",
    "rxjs": "~6.3.0",
    "tns-core-modules": "~5.3.0",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~7.2.0",
    "@nativescript/schematics": "~0.5.0",
    "@ngtools/webpack": "~7.2.0",
    "nativescript-dev-typescript": "~0.9.0",
    "nativescript-dev-webpack": "~0.21.0"
  },
  "gitHead": "803cec054c44c99eaa59cdc267993e6346f6cb3a",
  "readme": "NativeScript Application"
}
@tahir-jamil tahir-jamil changed the title Listview in pager using selector not updating the list ListView inside angular component not refreshing on data load with Pager May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant