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

Support a trackBy function for performance #33

Open
the-ult opened this issue Sep 28, 2017 · 0 comments
Open

Support a trackBy function for performance #33

the-ult opened this issue Sep 28, 2017 · 0 comments

Comments

@the-ult
Copy link

the-ult commented Sep 28, 2017

I'm submitting a ... (check one with "x")

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

Current behavior
I'm currently using the ngx-dnd with some extra filters and data which is loaded / triggered by an updated [BehaviorSubject] (Which means a total repaint/rebuilt/re-rendering every time)

The items have a lot of info (html, data, etc)

<ngx-dnd-container  [model]="availableBookItems$ | async | filterBy: filter | orderBy: 'book.displayName '"
        [dropZones]="['restricted-target']">
        <md-accordion class="__playlistitems-container">
          <ng-template let-availableBookItem="model">
            <md-expansion-panel class="u-movable" hideToggle="true">
              <md-expansion-panel-header expandedHeight="88px" collapsedHeight="72px">
                <md-panel-title fxFlex="60">
                  <bsm-availablebook-panel-title [book]="availableBookItem.book"></bsm-availablebook-panel-title>
                </md-panel-title>
                <md-panel-description fxFlexLayout fxLayoutAlign="end center" class=" u-text-align-right">
                  <span *ngIf="availableBookItem.book.collectionName" class="__subheader">
                  {{ availableBookItem.book.collectionName }}
                </span>
                  <button md-icon-button color="primary" (click)="addToPlaylist(availableBookItem); removeFromAvailable(availableBookItem)"
                    mdTooltip="Voeg boek toe aan de afspeellijst">
                  <md-icon>playlist_add</md-icon>
                </button>
                </md-panel-description>
              </md-expansion-panel-header>
              <!-- Panel content -->
              <bsm-book-panel-content [book]="availableBookItem.book"></bsm-book-panel-content>
            </md-expansion-panel>
          </ng-template>
        </md-accordion>
      </ngx-dnd-container>

It would be great if we could provide a/the trackBy function, to improve the performance

Please tell us about your environment:

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.4.3
node: 8.1.4
os: win32 x64
@angular/animations: 4.4.3
@angular/cdk: 2.0.0-beta.10-1b6b270
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/material: 2.0.0-beta.10-1b6b270
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/platform-server: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.4.3
@angular/compiler-cli: 4.4.3
@angular/language-service: 4.4.3
typescript: 2.5.2
  • ngx-charts version: x.x.x

"@swimlane/ngx-dnd": "~3.0.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants