Coder Social home page Coder Social logo

Comments (7)

marinantonio avatar marinantonio commented on May 22, 2024

I haven't checked Angular 6 yet, but I don't think there's much of a difference

from angular-mat-table-crud.

marinantonio avatar marinantonio commented on May 22, 2024

@vvavdiya Not sure did you notice but updating Angular is such a stresfull thing to do and you always get mixed results. Anyway I did check it now, besides changes in angular material I've noticed some RxJS code should be rewritten as well. So this project isn't at the moment compatible with Angular v6.

from angular-mat-table-crud.

Folrond avatar Folrond commented on May 22, 2024

Actually the "core part" of this soulution that makes the table work can be copied into an angular 6 project and it works well it can be improved here and there but so far this is one of the better solutions for supporting crud in material table.

So the answer is:
1, No, it is not an out of the box angular 6 solution
2, Yes, the code works with angular 6

from angular-mat-table-crud.

vasilikivmo avatar vasilikivmo commented on May 22, 2024

@vvavdiya Not sure did you notice but updating Angular is such a stresfull thing to do and you always get mixed results. Anyway I did check it now, besides changes in angular material I've noticed some RxJS code should be rewritten as well. So this project isn't at the moment compatible with Angular v6.

Could you explain how you fixed the issue with RxJS? I am using Angular6, and even though I change the way I make the import, something doesn't go well... Thanks!

from angular-mat-table-crud.

marinantonio avatar marinantonio commented on May 22, 2024

@vasilikivmo I still didn't, it requires a little bit of learning curve.

from angular-mat-table-crud.

vasilikivmo avatar vasilikivmo commented on May 22, 2024

@vasilikivmo I still didn't, it requires a little bit of learning curve.

I managed to do it. I had to modify the way I do the import of merge, fromEvent, BehaviorSubject inside my component and also make sure that both the versions of rxjs and rxjs-compat are updated

from angular-mat-table-crud.

marinantonio avatar marinantonio commented on May 22, 2024

I've updated master as well. Key changes are below:

Updated rxjs imports

import {BehaviorSubject, fromEvent, merge, Observable} from 'rxjs';
import {map} from 'rxjs/operators';

And operators:

    return merge(...displayDataChanges).pipe(map( () => {
        // Filter data
        this.filteredData = this._exampleDatabase.data.slice().filter((issue: Issue) => {
          const searchStr = (issue.id + issue.title + issue.url + issue.created_at).toLowerCase();
          return searchStr.indexOf(this.filter.toLowerCase()) !== -1;
        });

        // Sort filtered data
        const sortedData = this.sortData(this.filteredData.slice());

        // Grab the page's slice of the filtered sorted data.
        const startIndex = this._paginator.pageIndex * this._paginator.pageSize;
        this.renderedData = sortedData.splice(startIndex, this._paginator.pageSize);
        return this.renderedData;
      }
    ));
}

from angular-mat-table-crud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.