Code Monkey home page Code Monkey logo

Comments (7)

VadimDez avatar VadimDez commented on May 20, 2024

Can you provide more code?

from ngx-order-pipe.

SrideviYerneni avatar SrideviYerneni commented on May 20, 2024
 <thead>
              <tr>
                <th (click)="setOrder('Data.name')">Name</th>
                <th (click)="setOrder('Data.age')">Age</th>
              </tr>
            </thead>

Which particular part of code are you looking for?

from ngx-order-pipe.

VadimDez avatar VadimDez commented on May 20, 2024

To help you i need to see how you're sorting both tables. Provide code for both tables (html) and the part where you set order for both collections as well (ts).

from ngx-order-pipe.

SrideviYerneni avatar SrideviYerneni commented on May 20, 2024
 <table>
                <thead>
                  <tr>
                    <th (click)="setOrder('Data.name')">Name</th>
                    <th (click)="setOrder('Data.age')">Age</th>
                  </tr>
                </thead>
                <tbody>
                  <tr *ngFor="let Data of collection1 | orderBy: order:reverse:'case-insensitive'">
                    <td class="text-truncate">{{Data.name}}</td>
                    <td class="text-truncate">{{Data.age}}</td>
                  </tr>
                </tbody>
              </table>
 <table>
                <thead>
                  <tr>
                    <th (click)="setOrder('PersonData.id')">Id</th>
                    <th (click)="setOrder('PersonData.sport')">Sport</th>
                  </tr>
                </thead>
                <tbody>
                  <tr *ngFor="let PersonData of collection2 | orderBy: order:reverse:'case-insensitive'">
                    <td class="text-truncate">{{PersonData.id}}</td>
                    <td class="text-truncate">{{PersonData.sport}}</td>
                  </tr>
                </tbody>
              </table>

setOrder(value: string) { if (this.order === value) { console.log(this.order) this.reverse = !this.reverse; } this.order = value; }

from ngx-order-pipe.

SrideviYerneni avatar SrideviYerneni commented on May 20, 2024

@VadimDez Hi. Is there any update on this ? Please let me know if you need anything more information.

from ngx-order-pipe.

mauriciogracia avatar mauriciogracia commented on May 20, 2024

In my case I have to ng-fors that are not nested but they share the same sorting options and settings

Here you can see my case with code and with my "solution" which is not ideal

https://stackoverflow.com/questions/55927690/sort-pipe-is-always-sorting-casesensitive-ngx-order-pipe/55957416#55957416

from ngx-order-pipe.

stale avatar stale commented on May 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from ngx-order-pipe.

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.